How to sort an Array?



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

Post New Answer

More Data Structures Interview Questions

What is difference between map and hashmap?

1 Answers  


How many links are there in a binary tree of N nodes?

1 Answers   Tech Mahindra,


Which is more efficient merge sort vs quicksort?

1 Answers  


Can list contain null values?

1 Answers  


Is heap sort faster than quicksort?

1 Answers  


List some applications of tree-data structure?

1 Answers  


What are the average and worst time complexity in a sorted binary tree is

1 Answers   TCS,


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?

1 Answers  


Which interface treemap implements?

1 Answers  


What is binary search tree and explain its time complexity?

1 Answers  


Which time complexity is best?

1 Answers  


Categories