March 20th, 2013, 03:22 AM
Sorting a arraylist without using collections API in java
I have an arraylist , i need to sort the list without using
any collections API (like Collections.sort , Arrays.sort, TreeSet, HashSet etc.,) these library functions are restricted
ArrayList aList = new ArrayList();
I need to sort these list , kindly help required
March 20th, 2013, 05:19 AM
Maybe the following (although it is written for C) can give you an idea.
March 23rd, 2013, 06:55 PM
This is the Java forum - it is almost pointless linking him to a C solution when it isn't going to assist him in solving his problem.
Originally Posted by dariyoosh
There are different kinds of sorting algorithms that you can use, such as a quick sort or merge sort.
That has some examples and questions that you can attempt to sort through your Array List.
Hope this helps.
March 23rd, 2013, 07:10 PM
You can use any sorting techinique you want. The ArrayList class defines a get and set method.