Which are the sorted collections?
Answer / Sandeep Anannd
In Java, the following collections can maintain their elements in sorted order:n
1. TreeMap: A Red-Black tree implementation of the SortedMap interface.n
2. LinkedHashMap (when sorted by insertion order): Provides access to elements in the order they were inserted into the map.n
3. TimSort: The default sorting algorithm used for ArrayList and Vector, which is a hybrid sorting algorithm combining Mergesort and Insertionsort.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why hashtable is faster than arraylist?
Can we change the size of an array at run time?
Which time complexity is best?
Program to remove duplicate elements in an array.
What are the different types of data type?
Define static data structures?
Can map contain duplicate keys?
Explain Queue
Explain the term tail recursion?
What do u mean by array?
How memory is reserved using a declaration statement in data structure?
Run time memory allocation is known as in data structure?