|
1 | 1 | # Index of array |
2 | 2 |
|
3 | 3 | * [Permumations of Word](permutations_of_word.py) |
| 4 | + |
| 5 | +Find Permuatation of a given word. |
4 | 6 | * [Common Elements of three sorted arrays](sorted_array_three_common_elements.py) |
| 7 | + |
| 8 | +Find Common elements in three array given that all three arrays are sorted |
5 | 9 | * [Dutch Flag Problem](dutch_flag_problem.py) |
| 10 | + |
| 11 | + Given an array containing only 0s, 1s and 2s in a random order, arrange the array such that all 0s come |
| 12 | + before 1s which in turn come before all 2s |
| 13 | + |
| 14 | +Input - [1,2,0,1,2,1,0,1,2,1,0] |
| 15 | + |
| 16 | +Output - [0,0,0,1,1,1,1,1,2,2,2] |
6 | 17 | * [Partition an array into three parts with equal sum](partition_three_parts_equal_sum.py) |
7 | | -* [Binary search on an Infinite array](binary_search_infinite_array.py) |
| 18 | + |
| 19 | +Divide an array into three parts and sum all three parst must be same. |
| 20 | +* [Binary search on a finite array](binary_search_infinite_array.py) |
| 21 | + |
| 22 | +Performing binary search on a finite array |
| 23 | + |
8 | 24 | * [Largest Element](largest_element.py) |
9 | | -* [Right Place](right_place.py) |
| 25 | + |
| 26 | +Find out the largest element in an array |
| 27 | + |
10 | 28 | * [Rotation](rotation.py) |
| 29 | + |
| 30 | +Rotate an array for given number such that the number goes to the end of array |
| 31 | + |
| 32 | +input=[1,2,3,4,5] rotate around |
| 33 | + |
| 34 | +output= [4,5,1,2,3] |
11 | 35 | * [Find missing number](find_missing_numbers.py) |
| 36 | + |
| 37 | +find missing number between smallest and largest number in array which are not present in array |
| 38 | + |
| 39 | +input=[1,1,1,4] |
| 40 | +output=[2,3] |
| 41 | + |
12 | 42 | * [Three Largest Elements](three_largest_elements.py) |
| 43 | + |
| 44 | +Find three largest numbers from an array |
13 | 45 | * [Triplet Sum](triplet_sum.py) |
14 | | -* [Max Product](max_product.py) |
| 46 | + |
| 47 | +Find three elements of an array whose sum is eqaul to a given value |
| 48 | + |
15 | 49 | * [Moves to Zero](moves_zeros_to_end.py) |
| 50 | + |
| 51 | +Given an array move all zeros in arrays to the end. |
16 | 52 | * [Pivot Index](pivot_index.py) |
| 53 | + |
| 54 | +Find the index of element whose right element when added give the same value. |
17 | 55 | * [Intersection of Two Sorted Arrays](intersection_sorted_array.py) |
| 56 | + |
| 57 | + find out the common elements from two arrays |
18 | 58 | * [Max Triplet Sum](max_triplet_sum.py) |
19 | | -* [Number of 1's in Sorted Array](number_of_1_in_sorted_array.py) |
| 59 | + |
| 60 | +Find out maximium sum of any three elements for a given array |
| 61 | + |
20 | 62 | * [Square of Sorted Array](square_of_sorted_array.py) |
21 | | -* [Max Consecutive 1's](max_consecutive_ones.py) |
22 | | -* [Max Product Three Elements](max_product_three_elements.py) |
23 | | -* [Kadane Algorithm](kadane_algorithm.py) |
| 63 | + |
| 64 | +For a given array return an array that contains square of elements. |
| 65 | + |
24 | 66 | * [All Numbers Divisible](all_numbers_divisible.py) |
25 | | -* [Duplicates](duplicates.py) |
| 67 | + |
| 68 | + Find a number in the array such that all the elements in the array are divisible by it |
| 69 | + |
| 70 | + |
| 71 | + |
26 | 72 | * [Majority Element](majority_element.py) |
| 73 | + |
| 74 | +Find an element in an array which has most occurences |
27 | 75 | * [Find Sum](find_sum.py) |
| 76 | + |
| 77 | +Find if sum of any elements in array is eqaul to a given number |
28 | 78 | * [Quick Sort](quick_sort.py) |
29 | | -* [Peak Element](peak_element.py) |
| 79 | + |
| 80 | +### Implement Quick Sort algorithm |
| 81 | + |
| 82 | +Quicksort Running Time: |
| 83 | +Quick sort average case is O(n log n) |
| 84 | + each level takes O(n) but splitting the data is O(log n) |
| 85 | + O(n) * O(log n) = O(n log n) |
| 86 | +Worse case is O(log n2) |
| 87 | + if pivot is smallest value, each level is O(n) and splitting the data is O(n) |
| 88 | + O(n) * O(n) = O(n2) |
| 89 | + |
30 | 90 | * [Union Sorted Array](union_sorted_array.py) |
31 | | -* [Min Product](min_product.py) |
| 91 | + |
| 92 | +Perform Union operations on two arrays |
| 93 | + |
32 | 94 | * [Sort By Parity](sort_by_parity.py) |
| 95 | + |
| 96 | +Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. |
33 | 97 | * [Duplicate](duplicate.py) |
34 | | -* [Product of Array Except Self](product_of_array_except_self.py) |
| 98 | + |
| 99 | + Find duplicate in an array of integers given that the integers are in random order and |
| 100 | +not necessarily each integer i is 0 <= i <= N where N = length of array |
| 101 | +* [Product of Array Except Self](product_of_array_except_self.py) |
| 102 | + |
| 103 | +find the product of all elements in an array |
| 104 | + |
| 105 | +* [Right Place](right_place.py) |
| 106 | + |
| 107 | +Placing elements at right position in an array |
| 108 | +* [Max Product Three Elements](max_product_three_elements.py) |
| 109 | + |
| 110 | +Find out highest sum of three numbers in an array |
| 111 | +* [Max Consecutive 1's](max_consecutive_ones.py) |
| 112 | + |
| 113 | +Counts max number of one's in an array |
| 114 | + |
| 115 | +* [Kadane Algorithm](kadane_algorithm.py) |
| 116 | + |
| 117 | +Implementation of Kadane Algorithm |
| 118 | +* [Max Product](max_product.py) |
| 119 | +* [Number of 1's in Sorted Array](number_of_1_in_sorted_array.py) |
| 120 | +* [Duplicates](duplicates.py) |
| 121 | +* [Peak Element](peak_element.py) |
| 122 | +* [Min Product](min_product.py) |
0 commit comments