6 votes 6 votes Selection sort algorithm design technique is an example of Greedy method Divide-and-conquer Dynamic Programming Backtracking Algorithms isro2007 algorithms algorithm-design-technique easy + – go_editor asked Jun 10, 2016 • retagged Jan 7 by Hira Thakur go_editor 6.6k views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments asu commented Jun 10, 2016 reply Follow Share greedy....coz it always find small among the large to sort 1 votes 1 votes shekhar chauhan commented Jun 16, 2016 i edited by shekhar chauhan Jun 16, 2016 reply Follow Share Brute Force . 1 votes 1 votes shivanisrivarshini commented Jun 16, 2016 reply Follow Share I think all 4 options were incorrect 1 votes 1 votes Please log in or register to add a comment.
6 votes 6 votes Correct Answer would be 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. rude answered Jun 16, 2016 rude comment Share Follow See 1 comment See all 1 1 comment reply ankitgupta.1729 commented Apr 30, 2018 reply Follow Share sir, but greedy approach is used to solve optimization problems like maximize the profit , minimize the delay etc. so, to sort the numbers is a optimization problem ? 0 votes 0 votes Please log in or register to add a comment.
3 votes 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 srestha answered Jun 10, 2016 srestha comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments srestha commented Jun 10, 2016 reply Follow Share yes @shivani in ur link also told " the list is divided into two parts" 0 votes 0 votes asu commented Aug 2, 2016 reply Follow Share @ srestha after dividing ..how about conquering 0 votes 0 votes srestha commented Aug 2, 2016 reply Follow Share like selection sort does , is it not? 0 votes 0 votes Please log in or register to add a comment.
3 votes 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 shivanisrivarshini answered Jun 16, 2016 shivanisrivarshini comment Share Follow See all 3 Comments See all 3 3 Comments reply im.raj commented Jun 16, 2016 reply Follow Share Shivani, Yeah its bruitforce, but if you look at the core its greedy. Smilarly Insertion is divide and conquer. 1 votes 1 votes shekhar chauhan commented Jun 16, 2016 reply Follow Share You have given it a proof definitely you are right . 0 votes 0 votes Akhilesh Singla commented Apr 30, 2018 reply Follow Share The link you provided categorize solution of Knapsack Problem as Brute-Force approach. Whereas, Fractional Knapsack Problem is solved using Greedy Approach and 0/1 Knapsack Problem using Dynamic Programming. 0 votes 0 votes Please log in or register to add a comment.