@@ -101,7 +101,7 @@ This is a collection of algorithms and data structures which I've implement over
101
101
* [ Ramer Douglas Peucker] ( src/com/jwetherell/algorithms/mathematics/RamerDouglasPeucker.java )
102
102
103
103
## Numbers
104
- * Integers
104
+ * [ Integers] ( src/com/jwetherell/algorithms/numbers/Integers.java )
105
105
+ to binary String
106
106
- using divide and modulus
107
107
- using right shift and modulus
@@ -113,12 +113,12 @@ This is a collection of algorithms and data structures which I've implement over
113
113
- using logarithm
114
114
- using bits
115
115
+ to English (e.g. 1 would return "one")
116
- * Longs
116
+ * [ Longs] ( src/com/jwetherell/algorithms/numbers/Longs.java )
117
117
+ to binary String
118
118
- using divide and modulus
119
119
- using right shift and modulus
120
120
- using BigDecimal
121
- * Complex
121
+ * [ Complex] ( src/com/jwetherell/algorithms/numbers/Complex.java )
122
122
+ addition
123
123
+ subtraction
124
124
+ multiplication
@@ -127,60 +127,63 @@ This is a collection of algorithms and data structures which I've implement over
127
127
128
128
## Graphs
129
129
* Find shortest path(s) in a Graph from a starting Vertex
130
- - Dijkstra's algorithm (non-negative weight graphs)
131
- - Bellman-Ford algorithm (negative and positive weight graphs)
130
+ - [ Dijkstra's algorithm (non-negative weight graphs) ] ( src/com/jwetherell/algorithms/graph/Dijkstra.java )
131
+ - [ Bellman-Ford algorithm (negative and positive weight graphs) ] ( src/com/jwetherell/algorithms/graph/BellmanFord.java )
132
132
* Find minimum spanning tree
133
- - Prim's (undirected graphs)
134
- - Kruskal's (undirected graphs)
133
+ - [ Prim's (undirected graphs) ] ( src/com/jwetherell/algorithms/graph/Prim.java )
134
+ - [ Kruskal's (undirected graphs) ] ( src/com/jwetherell/algorithms/graph/Kruskal.java )
135
135
* Find all pairs shortest path
136
- - Johnsons's algorithm (negative and positive weight graphs)
137
- - Floyd-Warshall (negative and positive weight graphs)
138
- * Cycle detection
136
+ - [ Johnsons's algorithm (negative and positive weight graphs) ] ( src/com/jwetherell/algorithms/graph/Johnsons.java )
137
+ - [ Floyd-Warshall (negative and positive weight graphs) ] ( src/com/jwetherell/algorithms/graph/FloydWarshall.java )
138
+ * [ Cycle detection] ( src/com/jwetherell/algorithms/graph/CycleDetection.java )
139
139
- Depth first search while keeping track of visited Verticies
140
- * Topological sort
141
- * A* path finding algorithm
140
+ - [ Connected Components] ( src/com/jwetherell/algorithms/graph/ConnectedComponents.java )
141
+ * [ Topological sort] ( src/com/jwetherell/algorithms/graph/TopologicalSort.java )
142
+ * [ A* path finding algorithm] ( src/com/jwetherell/algorithms/graph/AStar.java )
142
143
* Maximum flow
143
- - Push-Relabel
144
+ - [ Push-Relabel] ( src/com/jwetherell/algorithms/graph/PushRelabel.java )
144
145
* Graph Traversal
145
- - Depth First Traversal
146
+ - [ Depth First Traversal] ( src/com/jwetherell/algorithms/graph/DepthFirstTravesal.java )
147
+ * [ Edmonds Karp] ( src/com/jwetherell/algorithms/graph/EdmondsKarp.java )
146
148
147
149
## Search
148
150
* Get index of value in array
149
- + Linear
150
- + Quickselect
151
- + Binary [ sorted array input only]
152
- + Lower bound [ sorted array input only]
153
- + Upper bound [ sorted array input only]
151
+ + [ Linear] ( src/com/jwetherell/algorithms/Sequences/LinearSearch.java )
152
+ + [ Quickselect] ( src/com/jwetherell/algorithms/Sequences/QuickSelect.java )
153
+ + [ Binary [ sorted array input only]] ( src/com/jwetherell/algorithms/Sequences/BinarySearch.java )
154
+ + [ Lower bound [ sorted array input only]] ( src/com/jwetherell/algorithms/Sequences/LpperBound.java )
155
+ + [ Upper bound [ sorted array input only]] ( src/com/jwetherell/algorithms/Sequences/UpperBound.java )
154
156
+ Optimized binary (binary until a threashold then linear) [ sorted array input only]
155
- + Interpolation [ sorted array input only]
157
+ + [ Interpolation [ sorted array input only]] ( src/com/jwetherell/algorithms/Sequences/InterpolationSearch.java )
156
158
157
159
## Sequences
158
- * Find longest common subsequence (dynamic programming)
159
- * Find longest increasing subsequence (dynamic programming)
160
- * Find number of times a subsequence occurs in a sequence (dynamic programming)
161
- * Find i-th element in a Fibonacci sequence
160
+ * [ Find longest common subsequence (dynamic programming) ] ( src/com/jwetherell/algorithms/Sequences/LongestCommonSubsequence.java )
161
+ * [ Find longest increasing subsequence (dynamic programming) ] ( src/com/jwetherell/algorithms/Sequences/LongestIncreasingSubsequence.java )
162
+ * [ Find number of times a subsequence occurs in a sequence (dynamic programming) ] ( src/com/jwetherell/algorithms/Sequences/SubsequenceCounter.java )
163
+ * [ Find i-th element in a Fibonacci sequence] ( src/com/jwetherell/algorithms/Sequences/FibonacciSequence.java )
162
164
+ using a loop
163
165
+ using recursion
164
166
+ using matrix multiplication
165
167
+ using Binet's formula
166
- * Find total of all elements in a sequence
168
+ * [ Find total of all elements in a sequence(Arithmetic Progression) ] ( src/com/jwetherell/algorithms/Sequences/ArithmeticProgression.java )
167
169
+ using a loop
168
170
+ using Triangular numbers
169
- * Largest sum of contiguous subarray (Kadane's algorithm)
170
- * Longest palindromic subsequence (dynamic programming)
171
+ * [ Largest sum of contiguous subarray (Kadane's algorithm) ] ( src/com/jwetherell/algorithms/Sequences/LargestSumContiguousSubarray.java )
172
+ * [ Longest palindromic subsequence (dynamic programming) ] ( src/com/jwetherell/algorithms/Sequences/LongestPalindromicSubsequence.java )
171
173
172
174
## Sorts
173
- * American Flag Sort
174
- * Bubble Sort
175
- * Counting Sort (Integers only)
176
- * Heap Sort
177
- * Insertion Sort
178
- * Merge Sort
179
- * Quick Sort
180
- * Radix Sort (Integers only)
181
- * Shell's Sort
175
+ * [ American Flag Sort] ( src/com/jwetherell/algorithms/Sorts/AmericanFlagSort.java )
176
+ * [ Bubble Sort] ( src/com/jwetherell/algorithms/Sorts/BubbleSort.java )
177
+ * [ Counting Sort (Integers only) ] ( src/com/jwetherell/algorithms/Sorts/CountingSort.java )
178
+ * [ Heap Sort] ( src/com/jwetherell/algorithms/Sorts/HeapSort.java )
179
+ * [ Insertion Sort] ( src/com/jwetherell/algorithms/Sorts/InsertionSort.java )
180
+ * [ Merge Sort] ( src/com/jwetherell/algorithms/Sorts/AMergeSort.java )
181
+ * [ Quick Sort] ( src/com/jwetherell/algorithms/Sorts/QuickSort.java )
182
+ * [ Radix Sort (Integers only) ] ( src/com/jwetherell/algorithms/Sorts/RadixSort.java )
183
+ * [ Shell's Sort] ( src/com/jwetherell/algorithms/Sorts/ShellSort.java )
182
184
183
185
## String Functions
186
+ ### [ String Functions] ( src/com/jwetherell/algorithms/strings/StringFunctions.java )
184
187
* Reverse characters in a string
185
188
+ using additional storage (a String or StringBuilder)
186
189
+ using in-place swaps
@@ -195,8 +198,8 @@ This is a collection of algorithms and data structures which I've implement over
195
198
+ using in-place symetric element compares
196
199
* Subsets of characters in a String
197
200
* Edit (Levenshtein) Distance of two Strings
198
- * KMP (Knuth–Morris–Pratt) Algorithm - Length of maximal prefix-suffix for each prefix
199
- * String rotations
201
+ * [ KMP (Knuth–Morris–Pratt) Algorithm - Length of maximal prefix-suffix for each prefix] ( src/com/jwetherell/algorithms/strings/KnuthMorrisPratt.java )
202
+ * [ String rotations] ( src/com/jwetherell/algorithms/strings/Rotation.java )
200
203
+ Findin lexicographically minimal string rotation
201
204
+ Findin lexicographically maximal string rotation
202
205
0 commit comments