Skip to content

Commit f19ca12

Browse files
Merge pull request #154 from PAPERPANKS/master
adding new content to README
2 parents df310be + 50f8693 commit f19ca12

File tree

1 file changed

+54
-1
lines changed

1 file changed

+54
-1
lines changed

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,17 @@ __Properties__
4747

4848
###### View the algorithm in [action][merge-toptal]
4949

50+
### Quick
51+
![alt text][quick-image]
5052

53+
From [Wikipedia][quick-wiki]: Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.
54+
55+
__Properties__
56+
* Worst case performance O(n^2)
57+
* Best case performance O(n log n) or O(n) with three-way partition
58+
* Average case performance O(n^2)
59+
60+
###### View the algorithm in [action][quick-toptal]
5161

5262
### Selection
5363
![alt text][selection-image]
@@ -61,6 +71,50 @@ __Properties__
6171

6272
###### View the algorithm in [action][selection-toptal]
6373

74+
### Shell
75+
![alt text][shell-image]
76+
77+
From [Wikipedia][shell-wiki]: Shellsort is a generalization of insertion sort that allows the exchange of items that are far apart. The idea is to arrange the list of elements so that, starting anywhere, considering every nth element gives a sorted list. Such a list is said to be h-sorted. Equivalently, it can be thought of as h interleaved lists, each individually sorted.
78+
79+
__Properties__
80+
* Worst case performance O(nlog2 2n)
81+
* Best case performance O(n log n)
82+
* Average case performance depends on gap sequence
83+
84+
###### View the algorithm in [action][shell-toptal]
85+
86+
### Time-Compexity Graphs
87+
88+
Comparing the complexity of sorting algorithms (Bubble Sort, Insertion Sort, Selection Sort)
89+
90+
[Complexity Graphs](https://github.com/prateekiiest/Python/blob/master/sorts/sortinggraphs.png)
91+
92+
----------------------------------------------------------------------------------
93+
94+
## Search Algorithms
95+
96+
### Linear
97+
![alt text][linear-image]
98+
99+
From [Wikipedia][linear-wiki]: linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched.
100+
Linear search runs in at worst linear time and makes at most n comparisons, where n is the length of the list.
101+
102+
__Properties__
103+
* Worst case performance O(n)
104+
* Best case performance O(1)
105+
* Average case performance O(n)
106+
* Worst case space complexity O(1) iterative
107+
108+
### Binary
109+
![alt text][binary-image]
110+
111+
From [Wikipedia][binary-wiki]: Binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value within a sorted array. It compares the target value to the middle element of the array; if they are unequal, the half in which the target cannot lie is eliminated and the search continues on the remaining half until it is successful.
112+
113+
__Properties__
114+
* Worst case performance O(log n)
115+
* Best case performance O(1)
116+
* Average case performance O(log n)
117+
* Worst case space complexity O(1)
64118

65119

66120
[bubble-toptal]: https://www.toptal.com/developers/sorting-algorithms/bubble-sort
@@ -94,4 +148,3 @@ __Properties__
94148
[binary-image]: https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_search_into_array.png
95149

96150

97-
[caesar]: https://upload.wikimedia.org/wikipedia/commons/4/4a/Caesar_cipher_left_shift_of_3.svg

0 commit comments

Comments
 (0)