Skip to content

Commit 61e2015

Browse files
unknownunknown
unknown
authored and
unknown
committed
Updated the readme
1 parent 4ac181e commit 61e2015

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed

README.md

+143
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,146 @@ java-algorithms-implementation
22
==============================
33

44
Algorithms and Data Structures implemented in Java
5+
6+
7+
This is a collection of algorithms and data structures which I've implement over the years in my academic and professional life. The code isn't overly-optimized but is written to be correct and readable. The algorithms and data structures are well tested and, unless noted, are believe to be 100% correct. All code is Java 1.6 compliant and was tested on a Intel Core 2 Duo Processor which has 2.0 GHz per core and 2 Gbytes of memory. The following VM Arguments were used: "-server -Xms1500m -Xmx1500m".
8+
9+
Created by Justin Wetherell
10+
github: http://github.com/phishman3579/java-algorithms-implementation
11+
e-mail: phishman3579@gmail.com
12+
Twitter: @phishman3579
13+
14+
# What's been implemented:
15+
16+
## Data Structures
17+
* AVL Tree
18+
* B-Tree
19+
* Binary Heap [backed by an array or a tree]
20+
* Binary Search Tree
21+
* Compact Suffix Trie [backed by a Patricia Trie]
22+
* Graph
23+
+ Undirected
24+
+ Directed (Digraph)
25+
* Hash Array Mapped Trie (HAMT)
26+
* Hash Map (associative array)
27+
* Interval Tree
28+
* KD Tree (k-dimensional tree or k-d tree)
29+
* List [backed by an array or a linked list]
30+
* Matrix
31+
* Patricia Trie
32+
* Quad-Tree (Point-Region or MX-CIF)
33+
* Queue [backed by an array or a linked list]
34+
* Radix Trie (associative array) [backed by a Patricia Trie]
35+
* Red-Black Tree
36+
* Segment Tree
37+
* Skip List
38+
* Splay Tree
39+
* Stack [backed by an array or a linked list]
40+
* Suffix Tree (Ukkonen's algorithm)
41+
* Suffix Trie [backed by a Trie]
42+
* Treap
43+
* Tree Map (associative array) [backed by an AVL Tree]
44+
* Trie
45+
* Trie Map (associative array) [backed by a Trie]
46+
47+
## Mathematics
48+
* Distance
49+
+ chebyshev
50+
+ euclidean
51+
* Division
52+
+ using a loop
53+
+ using recursion
54+
+ using shifts and multiplication
55+
+ using only shifts
56+
+ using logarithm
57+
* Multiplication
58+
+ using a loop
59+
+ using recursion
60+
+ using only shifts
61+
+ using logarithms
62+
* Primes
63+
+ is prime
64+
+ prime factorization
65+
+ sieve of eratosthenes
66+
67+
## Numbers
68+
* Integers
69+
+ to binary String
70+
- using divide and modulus
71+
- using right shift and modulus
72+
- using BigDecimal
73+
- using divide and double
74+
+ is a power of 2
75+
- using a loop
76+
- using recursion
77+
- using logarithm
78+
- using bits
79+
+ greatest common divisor
80+
- using Euclid's algorithm
81+
+ to English (e.g. 1 would return "one")
82+
* Longs
83+
+ to binary String
84+
- using divide and modulus
85+
- using right shift and modulus
86+
- using BigDecimal
87+
88+
## Path
89+
* Find shortest path(s) in a Graph from a starting Vertex
90+
- Dijkstra's algorithm (non-negative weight graphs)
91+
- Bellman-Ford algorithm (negative and positive weight graphs)
92+
* Find minimum spanning tree
93+
- Prim's (undirected graphs)
94+
* Find all pairs shortest path
95+
- Johnsons's algorithm (negative and positive weight graphs)
96+
- Floyd-Warshall (negative and positive weight graphs)
97+
* Cycle detection
98+
- Depth first search while keeping track of visited Verticies
99+
* Topological sort
100+
101+
## Search
102+
* Get index of value in array
103+
+ Linear
104+
+ Quickselect
105+
+ Binary [sorted array input only]
106+
+ Optimized binary (binary until a threashold then linear) [sorted array input only]
107+
+ Interpolation [sorted array input only]
108+
109+
## Sequences
110+
* Find longest common subsequence (dynamic programming)
111+
* Find number of times a subsequence occurs in a sequence (dynamic programming)
112+
* Find i-th element in a Fibonacci sequence
113+
+ using a loop
114+
+ using recursion
115+
+ using matrix multiplication
116+
+ using Binet's formula
117+
* Find total of all elements in a sequence
118+
+ using a loop
119+
+ using Triangular numbers
120+
121+
## Sorts
122+
* American Flag Sort
123+
* Bubble Sort
124+
* Counting Sort (Integers only)
125+
* Heap Sort
126+
* Insertion Sort
127+
* Merge Sort
128+
* Quick Sort
129+
* Radix Sort (Integers only)
130+
* Shell's Sort
131+
132+
## String Functions
133+
* Reverse characters in a string
134+
+ using additional storage (a String or StringBuilder)
135+
+ using in-place swaps
136+
+ using in-place XOR
137+
* Reverse words in a string
138+
+ using char swaps and additional storage (a StringBuilder)
139+
+ using StringTokenizer and additional (a String)
140+
+ using split() method and additional storage (a StringBuilder and String[])
141+
+ using in-place swaps
142+
* Is Palindrome
143+
+ using additional storage (a StringBuilder)
144+
+ using in-place symetric element compares
145+
* Subsets of characters in a String
146+
* Edit (Levenshtein) Distance of two Strings
147+

0 commit comments

Comments
 (0)