Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5b94776

Browse files
author
ryuta69
committedJul 17, 2020
Fix python naming conventions
1 parent 597f71a commit 5b94776

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎sorts/merge_insertion_sort.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
"""
1212

1313

14-
def mergeInsertionSort(collection):
14+
def merge_insertion_sort(collection):
1515
"""Pure implementation of merge-insertion sort algorithm in Python
1616
1717
:param collection: some mutable ordered collection with heterogeneous
1818
comparable items inside
1919
:return: the same collection ordered by ascending
2020
2121
Examples:
22-
>>> mergeInsertionSort([0, 5, 3, 2, 2])
22+
>>> merge_insertion_sort([0, 5, 3, 2, 2])
2323
[0, 2, 2, 3, 5]
2424
25-
>>> mergeInsertionSort([])
25+
>>> merge_insertion_sort([])
2626
[]
2727
28-
>>> mergeInsertionSort([-2, -5, -45])
28+
>>> merge_insertion_sort([-2, -5, -45])
2929
[-45, -5, -2]
3030
"""
3131

@@ -100,4 +100,4 @@ def merge(left, right):
100100
if __name__ == "__main__":
101101
user_input = input("Enter numbers separated by a comma:\n").strip()
102102
unsorted = [int(item) for item in user_input.split(",")]
103-
print(mergeInsertionSort(unsorted))
103+
print(merge_insertion_sort(unsorted))

0 commit comments

Comments
 (0)
Please sign in to comment.