MCPcopy Create free account
hub / github.com/geekcomputers/Python / Sort

Method Sort

Sorting Algorithms/Sorting_List.py:21–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 current.next = new_node
20
21 def Sort(self):
22 temp = self.head
23 while temp:
24 minn = temp
25 after = temp.next
26 while after:
27 if minn.data > after.data:
28 minn = after
29 after = after.next
30 key = temp.data
31 temp.data = minn.data
32 minn.data = key
33 temp = temp.next
34
35 def Display(self):
36 temp = self.head

Callers 1

Sorting_List.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected