How do you do a selection sort?
Answer / Avantika Singh
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. Here's a basic pseudocode:
1. For each position i in the array, starting with i=0:
a. Find the smallest value among arr[i..end of array]
b. Swap arr[i] and the smallest found value
| Is This Answer Correct ? | 0 Yes | 0 No |
Mention a few applications of linked lists?
Why do we use hashmap?
What’s the difference between enumeration and iterator interfaces?
Differentiate stack from array?
What is entryset in hashmap?
Is any implicit arguments are passed to a function when it is called?
What is the difference between hashset and linkedhashset?
How can avl tree be useful in all the operations as compared to binary search tree?
Is hashset synchronized?
What package is arraylist?
How to use appendNode() in linkedlist()?
What is the difference between hashset and treeset?