We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 395c2cd commit e0b5ae3Copy full SHA for e0b5ae3
1 file changed
pygorithm/sorting/merge_sort.py
@@ -79,11 +79,14 @@ def time_complexities():
79
return "Best Case: O(nlogn), Average Case: O(nlogn), Worst Case: O(nlogn)"
80
81
82
-def get_code():
+def get_code(iter=False):
83
"""
84
easily retrieve the source code
85
of the sort function
86
87
:return: source code
88
89
+ if iter:
90
+ return inspect.getsource(sorti) + "\n"
91
+
92
return inspect.getsource(sort) + "\n" + inspect.getsource(merge)
0 commit comments