Explain the selection sort algorithm?



Explain the selection sort algorithm?..

Answer / Virendra Kumar Shukla

Selection Sort is a simple sorting algorithm that works by repeatedly finding the minimum element from the unsorted part of the array and putting it at the beginning of the sorted part. It has two main steps: selecting the smallest (or largest, depending on whether it's a min or max heap) element and swapping it with the first (or last) element in the unsorted portion. The time complexity is O(n^2).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is string variable?

1 Answers  


What are java packages? What is the significance of packages?

1 Answers  


Is JRE required to compile Java files ?

4 Answers   HCL,


What is java beans?

1 Answers  


can we override the main() method in java????

3 Answers   Vimukti Technologies,


FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

2 Answers  


how to fing linkedlist is circular or not?

1 Answers   TCS,


what is main difference b/w abstract class and interface

4 Answers  


What is the protocol is used in type4 driver?

4 Answers   CMC,


What are controls and their different types in awt?

1 Answers  


Why is stringbuffer faster than string?

1 Answers  


How many types of equations are there?

1 Answers  


Categories