TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What are some must-know algorithms?

10 pointsby _dt47over 11 years ago
I'm fairly advanced in Java, and i want to learn some algorithms. Any suggestions?

4 comments

prateekjover 11 years ago
Here are a few (in no particular order):<p>- Dynamic Programming<p>- Graph algorithms: Traversal (A*), shortest path (Dijkstra, Bidirectional, Floyd–Warshall), minimum spanning tree<p>- Recursive Search Techniques<p>- Search Trees (binary, n-ary, splay, AVL)<p>- Suffix trees<p>- Parsing using regex<p>- Sorting (with all the variations)<p>- Hashing<p>- Greedy Algos<p>- Divide and conquer<p>- Genetic algorithms<p>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).
memracomover 11 years ago
Do the Advanced Algorithms course in MIT`s Open Courseware site here <a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-854j-advanced-algorithms-fall-2005/index.htm" rel="nofollow">http:&#x2F;&#x2F;ocw.mit.edu&#x2F;courses&#x2F;electrical-engineering-and-comput...</a><p>Also look into Hadoop, Mahout and machine learning in general.
wikwocketover 11 years ago
The best algorithm I know is to use the appropriate built-in classes, and then do something clever only if performance is an issue.<p>In my opinion knowing the popular and &quot;best practice&quot; design patterns is more important than knowing a lot of algorithms. Although I suppose they overlap a bit.
clyfeover 11 years ago
Food for thought:<p><a href="https://en.wikipedia.org/wiki/Sorting_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sorting_algorithm</a><p><a href="https://en.wikipedia.org/wiki/Divide_and_conquer_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Divide_and_conquer_algorithm</a><p><a href="https://en.wikipedia.org/wiki/Backtracking" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Backtracking</a><p><a href="https://en.wikipedia.org/wiki/Dynamic_programming" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dynamic_programming</a><p><a href="https://en.wikipedia.org/wiki/Greedy_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Greedy_algorithm</a><p><a href="https://en.wikipedia.org/wiki/Depth-first_search" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Depth-first_search</a><p><a href="https://en.wikipedia.org/wiki/Breadth-first_search" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Breadth-first_search</a><p><a href="https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Aho%E2%80%93Corasick_string_ma...</a><p><a href="https://en.wikipedia.org/wiki/Minimax" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Minimax</a><p><a href="https://en.wikipedia.org/wiki/A*_search_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;A*_search_algorithm</a><p><a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dijkstra%27s_algorithm</a><p><a href="https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ford%E2%80%93Fulkerson_algorit...</a><p><a href="https://en.wikipedia.org/wiki/Newton%27s_method" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Newton%27s_method</a><p><a href="https://en.wikipedia.org/wiki/Gradient_descent" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gradient_descent</a><p><a href="https://en.wikipedia.org/wiki/Naive_Bayes_classifier" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Naive_Bayes_classifier</a><p><a href="https://en.wikipedia.org/wiki/Linear_regression" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Linear_regression</a><p><a href="https://en.wikipedia.org/wiki/Perceptron" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Perceptron</a><p><a href="https://en.wikipedia.org/wiki/Principal_component_analysis" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Principal_component_analysis</a><p>Solve some of:<p><a href="https://projecteuler.net/" rel="nofollow">https:&#x2F;&#x2F;projecteuler.net&#x2F;</a><p><a href="http://acm.timus.ru/problemset.aspx" rel="nofollow">http:&#x2F;&#x2F;acm.timus.ru&#x2F;problemset.aspx</a>