Example #1
0
    def test5(self):

        util = TestUtil()
        list = util.creatList([3,5])
        solution = Solution()
        result = solution.reverseBetween(list, 1, 1)
        self.assertEquals("35", util.printList(result))
Example #2
0
    def test3(self):

        util = TestUtil()
        list = util.creatList([ 1, 2, 3,4, 5])
        solution = Solution()
        result = solution.reverseBetween(list, 2, 4)
        self.assertEquals("14325", util.printList(result))
Example #3
0
 def test1(self):
     util = TestUtil()
     list =util.creatList([0, 1, 2, 4, 5, 7])
     solution= Solution()
     result=solution.reverseBetween(list,2,3)
     self.assertEquals("021457", util.printList(result))
Example #4
0
 def test1(self):
     util = TestUtil()
     list = util.creatList([0, 1, 2, 2, 3, 4])
     solution = Solution()
     result = solution.deleteDuplicates(list)
     self.assertEquals("0134", util.printList(result))
Example #5
0
 def test5(self):
     util = TestUtil()
     list = util.creatList([1, 1])
     solution = Solution()
     result = solution.deleteDuplicates(list)
     self.assertEquals("", util.printList(result))
Example #6
0
 def test3(self):
     util = TestUtil()
     list = util.creatList([1, 1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6])
     solution = Solution()
     result = solution.deleteDuplicates(list)
     self.assertEquals("26", util.printList(result))