Tag Archives: java

Sorting methods in Java.

I made this during school and have used it many a times while preparing for an interview or checking my new work in new languages. The class has static methods for all of the classic sorting methods like selection sort, bubble sort, insertion sort, heap sort, merge sort and quick sort. public class Sorts { [...]
Posted in Programming | Also tagged , | Leave a comment

Print string permutations with Java.

I wrote this just to exercise my old java skills. If you find a use for it, let me know what you did with it! import java.util.*;   public class Permute { LinkedList<String> orig;   public Permute(LinkedList<String> _orig) { orig = _orig; }   public LinkedList<String> BuildPerms(LinkedList<String> thisOrig) { Iterator<String> itr = thisOrig.iterator(); LinkedList<String> thisSol [...]
Posted in Programming | Also tagged , | Leave a comment