added comments and documentation

pull/1211/head
Int Fract 2023-06-28 08:11:20 +00:00
parent caf780f785
commit 622d4deeae
2 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@
- [Remove duplicate items](arrays/remove_duplicates_list.py) - [Remove duplicate items](arrays/remove_duplicates_list.py)
- [Dutch National Flag Algorithm](arrays/dutch_national_flag_algo.py) - [Dutch National Flag Algorithm](arrays/dutch_national_flag_algo.py)
- [Max Sub Array Sum](arrays/max_sub_array_sum.py) - [Max Sub Array Sum](arrays/max_sub_array_sum.py)
- [Sorted Insert](arrays/sorted_insert.py)
## Linked Lists ## Linked Lists
- [Doubly](linked_lists/doubly.py) - [Doubly](linked_lists/doubly.py)

View File

@ -6,6 +6,7 @@ Space Complexity : O(1)
import math import math
# find the insertion position of an element in a sorted list
def sortedIndex(a: list, item): def sortedIndex(a: list, item):
start = 0 start = 0
end = len(a) end = len(a)