File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
leetcode/linked_list_cycle Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 1212 " \n " ,
1313 " sys.path.append(os.path.join(os.getcwd(), \" ..\" ))\n " ,
1414 " \n " ,
15- " # Import create_cycle_list from tests\n " ,
1615 " from linked_list_cycle.tests import TestLinkedListCycle\n " ,
17- " from solution import Solution\n " ,
18- " \n " ,
19- " from leetcode_py import ListNode\n " ,
20- " \n " ,
21- " create_cycle_list = TestLinkedListCycle.create_cycle_list"
16+ " from solution import Solution"
2217 ]
2318 },
2419 {
5247 }
5348 ],
5449 "source" : [
55- " head = TestLinkedListCycle.create_cycle_list(values, pos)\n " ,
50+ " head = TestLinkedListCycle() .create_cycle_list(values, pos)\n " ,
5651 " result = Solution().has_cycle(head)\n " ,
5752 " result"
5853 ]
5954 },
6055 {
6156 "cell_type" : " code" ,
62- "execution_count" : 7 ,
57+ "execution_count" : 4 ,
6358 "id" : " test" ,
6459 "metadata" : {},
6560 "outputs" : [],
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ class TestLinkedListCycle:
1010 def setup_method (self ):
1111 self .solution = Solution ()
1212
13- @staticmethod
14- def create_cycle_list (values : list [int ], pos : int ) -> ListNode [int ] | None :
13+ def create_cycle_list (self , values : list [int ], pos : int ) -> ListNode [int ] | None :
1514 if not values :
1615 return None
1716
You can’t perform that action at this time.
0 commit comments