How to sort an Array?
Answer / Dharmendra Patel
To sort an array in Java, you can use various methods such as:
1. Bubble Sort
2. Selection Sort
3. Insertion Sort
4. Merge Sort
5. Quick Sort
The choice of the sorting algorithm depends on the size and type of data in the array.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is difference between map and hashmap?
How many links are there in a binary tree of N nodes?
Which is more efficient merge sort vs quicksort?
Can list contain null values?
Is heap sort faster than quicksort?
List some applications of tree-data structure?
What are the average and worst time complexity in a sorted binary tree is
List all data structures you would use for a memory management module.
1 Answers HPCL, Hughes Systique Corporation, ITC Indian Tobacco Company,
Which collection class is thread safe?
Which interface treemap implements?
What is binary search tree and explain its time complexity?
Which time complexity is best?