
What are some must-know algorithms? - _dt47
I&#x27;m fairly advanced in Java, and i want to learn some algorithms. 
Any suggestions?
======
prateekj
Here are a few (in no particular order):

\- Dynamic Programming

\- Graph algorithms: Traversal (A*), shortest path (Dijkstra, Bidirectional,
Floyd–Warshall), minimum spanning tree

\- Recursive Search Techniques

\- Search Trees (binary, n-ary, splay, AVL)

\- Suffix trees

\- Parsing using regex

\- Sorting (with all the variations)

\- Hashing

\- Greedy Algos

\- Divide and conquer

\- Genetic algorithms

There are a few other algorithms that are must-know too. I guess that would
depend on the domain we are in (computer vision, machine learning, NLP, etc).

------
memracom
Do the Advanced Algorithms course in MIT`s Open Courseware site here
[http://ocw.mit.edu/courses/electrical-engineering-and-
comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-854j-advanced-algorithms-fall-2005/index.htm)

Also look into Hadoop, Mahout and machine learning in general.

------
wikwocket
The best algorithm I know is to use the appropriate built-in classes, and then
do something clever only if performance is an issue.

In my opinion knowing the popular and "best practice" design patterns is more
important than knowing a lot of algorithms. Although I suppose they overlap a
bit.

------
clyfe
Food for thought:

[https://en.wikipedia.org/wiki/Sorting_algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm)

[https://en.wikipedia.org/wiki/Divide_and_conquer_algorithm](https://en.wikipedia.org/wiki/Divide_and_conquer_algorithm)

[https://en.wikipedia.org/wiki/Backtracking](https://en.wikipedia.org/wiki/Backtracking)

[https://en.wikipedia.org/wiki/Dynamic_programming](https://en.wikipedia.org/wiki/Dynamic_programming)

[https://en.wikipedia.org/wiki/Greedy_algorithm](https://en.wikipedia.org/wiki/Greedy_algorithm)

[https://en.wikipedia.org/wiki/Depth-
first_search](https://en.wikipedia.org/wiki/Depth-first_search)

[https://en.wikipedia.org/wiki/Breadth-
first_search](https://en.wikipedia.org/wiki/Breadth-first_search)

[https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_ma...](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm)

[https://en.wikipedia.org/wiki/Minimax](https://en.wikipedia.org/wiki/Minimax)

[https://en.wikipedia.org/wiki/A*_search_algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm)

[https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)

[https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorit...](https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm)

[https://en.wikipedia.org/wiki/Newton%27s_method](https://en.wikipedia.org/wiki/Newton%27s_method)

[https://en.wikipedia.org/wiki/Gradient_descent](https://en.wikipedia.org/wiki/Gradient_descent)

[https://en.wikipedia.org/wiki/Naive_Bayes_classifier](https://en.wikipedia.org/wiki/Naive_Bayes_classifier)

[https://en.wikipedia.org/wiki/Linear_regression](https://en.wikipedia.org/wiki/Linear_regression)

[https://en.wikipedia.org/wiki/Perceptron](https://en.wikipedia.org/wiki/Perceptron)

[https://en.wikipedia.org/wiki/Principal_component_analysis](https://en.wikipedia.org/wiki/Principal_component_analysis)

Solve some of:

[https://projecteuler.net/](https://projecteuler.net/)

[http://acm.timus.ru/problemset.aspx](http://acm.timus.ru/problemset.aspx)

