Efficient Java Search and Sort Implementations

Does anyone have a good reference to a set of implementations of Java code for common search and sort algorithms.

There are many ways to drop a cat (it’s easy to find Java code from different algos on the network), but is there a list of the most effective Java methods for implementing these various algorithms?

There is, for example, http://www.algorithmist.com , but most implementations are in C / C ++.

Hooray!

+3
source share
5 answers

I would suggest looking at the source code for the standard Java library.

Collections Arrays , .

Collections.java openjdk: http://www.docjar.com/html/api/java/util/Collections.java.html

+3

" Java ( 1-4)" Sedgewick . , .

+1

, , .. src.zip Oracle-Java, .

, , , . .

+1
source

The complexity of the execution of the algorithm is indifferent to the programming language that it implemented, so you should not worry too much. But since you are asking, I would consider using grepcode . For example, look what I found when I was looking for "java quicksort".

0
source

https://intelligentjava.wordpress.com/2014/07/05/sorting-algorithms/ has a good overview with implementation and benchmark for comparing performance.

0
source

All Articles