Exemplo n.º 1
0
 def test_find_circle_num__example1(self):
     """
     Example 1:
     Input:
     [[1,1,0],
      [1,1,0],
      [0,0,1]]
     Output: 2
     """
     m = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
     num = FriendCircles().findCircleNum(m)
     self.assertEqual(2, num)
Exemplo n.º 2
0
 def test_find_circle_num__1011_0100_1011_1001(self):
     m = [[1, 0, 1, 1], [0, 1, 0, 0], [1, 0, 1, 1], [1, 0, 1, 1]]
     num = FriendCircles().findCircleNum(m)
     self.assertEqual(2, num)
Exemplo n.º 3
0
 def test_find_circle_num__1(self):
     m = [[1]]
     num = FriendCircles().findCircleNum(m)
     self.assertEqual(1, num)