The Gateway to Computer Science Excellence

+6 votes

Selection sort algorithm design technique is an example of

- Greedy method
- Divide-and-conquer
- Dynamic Programming
- Backtracking

+6 votes

** A) Greedy Algorithm**

Because, In the first iteration we put a pointer in the start of the array. Then next we start searching index of minimum element index in the rest of the array. Then replace the starting pointer value with minimum index value. (Considering the we are sorting in ascending order). Then repeat this process for each element.

+3 votes

Selection sort used in divide and conquer technique

Here smallest element replaces 1st element of the array , 2nd smallest element replaces 2nd element and like that all element sorted

Here smallest element replaces 1st element of the array , 2nd smallest element replaces 2nd element and like that all element sorted

+3 votes

Selection Sort is Brute force Approach

http://faculty.simpson.edu/lydia.sinapova/www/cmsc250/LN250_Weiss/L28-Design.htm#brute

As we move through all the elements of array so greedy is within available elements we select min between 2 elements but we further move to all elements so i think it wont be greedy

52,345 questions

60,513 answers

201,931 comments

95,356 users