You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-8
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,8 @@
4
4
5
5
These are for demonstration purposes only. There are many implementations of sorts in the Python standard library that are much better for performance reasons.
6
6
7
-
## Sorting Algorithms
7
+
## Sort Algorithms
8
8
9
-
### Binary
10
-
Add comments here
11
9
12
10
### Bubble
13
11
![alt text][bubble-image]
@@ -36,7 +34,7 @@ __Properties__
36
34
###### View the algorithm in [action][insertion-toptal]
37
35
38
36
39
-
## Merge
37
+
###Merge
40
38
![alt text][merge-image]
41
39
42
40
From [Wikipedia][merge-wiki]: In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output. Mergesort is a divide and conquer algorithm that was invented by John von Neumann in 1945.
@@ -49,7 +47,7 @@ __Properties__
49
47
50
48
###### View the algorithm in [action][merge-toptal]
51
49
52
-
## Quick
50
+
###Quick
53
51
![alt text][quick-image]
54
52
55
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.
@@ -61,7 +59,7 @@ __Properties__
61
59
62
60
###### View the algorithm in [action][quick-toptal]
63
61
64
-
## Selection
62
+
###Selection
65
63
![alt text][selection-image]
66
64
67
65
From [Wikipedia][selection-wiki]: The algorithm divides the input list into two parts: the sublist of items already sorted, which is built up from left to right at the front (left) of the list, and the sublist of items remaining to be sorted that occupy the rest of the list. Initially, the sorted sublist is empty and the unsorted sublist is the entire input list. The algorithm proceeds by finding the smallest (or largest, depending on sorting order) element in the unsorted sublist, exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist boundaries one element to the right.
@@ -73,7 +71,7 @@ __Properties__
73
71
74
72
###### View the algorithm in [action][selection-toptal]
75
73
76
-
## Shell sort
74
+
###Shell
77
75
![alt text][shell-image]
78
76
79
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 anywherem considereing every nth element gives a sorted list. Such a list is said to be h-sorted. Equivanelty, it can be thought of as h intterleaved lists, each individually sorted.
@@ -99,7 +97,16 @@ __Properties__
99
97
* Average case performance O(n)
100
98
* Worst case space complexity O(1) iterative
101
99
100
+
### Binary
101
+
![alt text][binary-image]
102
+
103
+
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.
102
104
105
+
__Properties__
106
+
* Worst case performance O(log n)
107
+
* Best case performance O(1)
108
+
* Average case performance O(log n)
109
+
* Worst case space complexity O(1)
103
110
104
111
## Ciphers
105
112
@@ -115,6 +122,7 @@ The encryption step performed by a Caesar cipher is often incorporated as part o
115
122
In cryptography, a **transposition cipher** is a method of encryption by which the positions held by units of plaintext (which are commonly characters or groups of characters) are shifted according to a regular system, so that the ciphertext constitutes a permutation of the plaintext. That is, the order of the units is changed (the plaintext is reordered).<br>
116
123
Mathematically a bijective function is used on the characters' positions to encrypt and an inverse function to decrypt.
0 commit comments