Unnamed: 0 int64 1 5.86k | Question stringclasses 24
values | Sample ANS stringclasses 24
values | Student ANS stringlengths 1 1.06k | Score float64 0 2.5 |
|---|---|---|---|---|
2,760 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort we start iteration from 1 index and check previous one if its greater ,then start inserting/moving it right-words.\nwhere as in selection sort we start iteration from 0 index then start comparing consecutive elements if not rightly placed then swapping them . | 0 |
2,761 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort inserts a value in the array and arranges the rest with respect to that particular value while selection sort compares each particular value to sort all of the values. | 1 |
2,762 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in selection sort we choose a particular element and we find its correct position by comparing it with all the elements and then placing it at the correct position\nin insertion sort we insert the particular element at a place and then move it comparing it to the elements next to it | 1 |
2,763 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | The main difference between insertion sort and selection sort is that insertion sort performs sorting by exchanging an element at a time with the partially sorted array while selection sort performs sorting by selecting the smallest element from the remaining elements and exchanging it with the element in the correct l... | 2.5 |
2,765 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | inserction in which each elemement is palced in the cporrect place and in selection on the base of max amd imn we place the element | 2 |
2,766 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort, we take an element and put it in it's correct position\nIn insertion sort, every element that comes in the array, we put at the correct position as it comes | 1 |
2,767 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort and selection sort differs in term of stability insertion sort requires extra space where as selection sort does not require the extra space | 1 |
2,768 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | The insertion sort inserts the values in a presorted file to sort a set of values. On the other hand, the selection sort finds the minimum number from the list and sort it in some order. | 2 |
2,769 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in selection sort we 1st take a number let it be a smallest number and iterate through the loop if any smallest number is found than swap with the number \ninsertion sort is taking minimum element and adding the number on left side if small and on the right is large | 2 |
2,770 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort we place the element to its right position but in selection sort we find the min element compare it and then make suitable swaps | 2 |
2,771 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | selection sort finds the smallest element then places it in first position and so on however insertion sort | 1 |
2,772 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In Insertion Sort we compare all the elements and place them at their correct position.\nIn Selection Sort we find max and min and then compare it with the elements in the array and then swap it. | 2 |
2,773 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort inserts the value in a presorted files to sort a set of values.\nSelection sort find the minimum number from the list and sorted in some order. | 2 |
2,774 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort inserts the value in a presorted file to sort a set of values.\nSelection sort find the minimum number from the list and sort it in some order. | 2 |
2,775 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in selection sort, we compare every element with every other element and find minimum element, which is replaced by first element. This sort algorithm works until array is sorted.\nin insertion sort, we compare elements before the selected element and swap them so that they are sorted. | 2.5 |
2,776 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort has a better time complexity than the selection sort. \nAlso selection sort selects the least element and replaces it with the other.\nInsertion sort creates an array of sorted elements and inserts the element in the sorted array. | 2.5 |
2,778 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | selections picks minimum element first and insertion picks a element and put it in its correct place | 2.5 |
2,779 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort with the helps of two loops we compare every element with every other element present in the array whereas in selection sort we take first two elements and and compare them and then set their sorted position in this way we do with the rest of the element in the array.\nthere are difference in terms of... | 2 |
2,780 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort a minimum element is selected and is compared with other elements to sort.\nSelection sort works by comparing adjacent elements | 2.5 |
2,781 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | sorts are basically the sorting techniques means sorting to get the output easily and effectively\ninsertion sorts means sorting up the given data in an order and then inserting up the element which needs to be added and element that has to be added is too done in an order\nwhereas as selection sort means you are given... | 2 |
2,784 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort and selection sort are different in the sense that in selection sort we select the element and run two loops. In the first loop we iterate through the array if there is any element in the array smaller than the selected element we swap else we continue. In the outer loop if after all the swapping takes p... | 1 |
2,785 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | selection sort works on minimum number of swaps possible | 1 |
2,786 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Selection Sort is different from Insertion Sort\nin selection sort we sort our array by finding largest element one by one \nand sorting array in Length*length no of operations\nbut insertion we try to do it by key value | 1 |
2,787 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | both the sorting approaches have different techniques , selection sort sort first two indexes and moves linearly whereas insertion sort inserts a value and checks it with every index. | 2 |
2,788 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Selection sorts scans the unsorted part to find the minimum element while insertion sort scans the sorted part to find the correct position to insert. | 1 |
2,789 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | we insert particular element on its correct position while in selection we insert element on particular space. | 2 |
2,790 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | The insertion sort inserts the values in a presorted order to sort the values.\n The selection sort finds the minimum number from the list and sort it in some order | 1 |
2,791 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort element is inserted between the array elements after comparison.\nIn selection sort element is selected on by one and placed in another sorted array. | 2 |
2,792 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort we compare and place the minimum element at the start and then perform the same operation the the next elements. | 2 |
2,793 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort, an element is picked and then placed in its correct position and in selection sort, smallest element is found in each loop and is placed in the start accordingly. | 2 |
2,794 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort: in insertion sort we start from 1st index and compare it with previous index and swap if the previous element is larger. Then we move on to 2nd index and compare it with the previous 2 elements and sap if required. Iteration continues until the array is sorted.\n\nSelection Sort: In selection sort, we t... | 1 |
2,795 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort the minimum is selected and pushed to the sorted part of the array. In Insertion sort a duplicate value is copied and then replaced with the appropriate value to be inserted. The time complexities are also different. | 2 |
2,796 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in selection sort -we consider the first element as sorted and selects the smallest element from the rest array and put it at the starting.\nin insertion sort- we consider the first element as sorted and picks the element form the rest array and insert it at the right index depending on the pattern of sorting. | 2 |
2,797 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In Insertion sort, it proceeds from the very first value and inserts the value after thorough calculation at it's right place. Then it moves onto the other value and repeats the process. Meanwhile in Selection sort, the picked out value is chosen on the basis of a criteria (Max at times) and after proper comparison pla... | 1 |
2,798 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Searching the required element one by one in the array is called linear searching.\nComplexity is O(n). | 1 |
2,800 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort pushes the element after checking each element in position but it is not fixed position and can vary but in selection sort once the element is checked and selected, the position will not vary. | 2 |
2,801 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort searches the unsorted part to insert the element at right position whereas selection sort finds the minimum element from the unsorted part | 1 |
2,802 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In linear searching the array or vector is traversed using a loop in which each element of the array is at least visited one time until the loop ends. It's complexity is of O(n) where n is the number of elements in the array. | 2 |
2,803 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort a sorted_array is maintained and elements are inserted in such a way where we have to find the min elem (for index 0) and then insert the next greater or equal element than the previous n-1 element in the sorted_array for subsequent indices. In selection sort the elements are swapped in-place until th... | 1 |
2,804 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Selection sort has a time complexity of O(n^2) in all cases.\nInsertion sort has a time complexity of O(n^2) | 1 |
2,805 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort, we take the first element as minimum element, then we find the minimum element from the remaining array using a for loop and then compare both elements and place them accordingly.\n\nIn insertion sort, we bring the smallest element from the array and insert it in it's correct position. | 1 |
2,806 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | selections sort is basically sorting elements by checking all elements. Insertion sort gives the right position of the maximum element and then works on the rest of the array. | 1 |
2,808 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort, a element is inserted at its correct position, while in selection sort, an element is selected for its correct position. | 1 |
2,809 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | push, pop (it is basically operation \ | 1 |
2,811 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | The insertion sort inserts the values in an already sorted structure to sort a set of values. The selection sort finds the minimum number from the structure and sort it in some order. | 2 |
2,812 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort an object is take and taken into the list so that the list remain sorted while in selection sort list is sorted according to places like at 0 for index for an array the smallest element is searched through various comparisons using for loop and swapped at 0th index with index at which it was present t... | 1 |
2,813 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort take O(n^2) time while selection sort take O(n) time | 2 |
2,814 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort and selection sorts both are sorting algo which have O(n^2) time complexity but there working is different. | 1 |
2,815 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Linear Searching is the algorithm used to seach the target element by visiting every element in the given array.\nTime Complexity- O(n) | 1 |
2,816 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort works like inserting the element one by one in array or string or stack or queue and then sorting according but it is not in case of selection sort , in selection sort we first sort elements according to requirement and then select only require elements means selecting elements according require , by doi... | 2 |
2,817 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | selection sort selects the element and takes it as the max/min and then moves to the next element and compares it top the previous \nmax/min and places it, it selects every element and picks them up and puts them in the order like this. Where as insertion sort uses\nmore time than selection sort in particular cases an... | 1 |
2,820 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort we keep inserting an element into the sorted part of the array but in selection sort we select an element and then put it at its correct place in the array. | 2 |
2,821 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort we check for each element in the array and insert the element if the element is greater then its preceding element and in selection sort | 1 |
2,822 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort the array is divide to into two parts one is from 0 to i and other is from i to j . In this we assume that the array 0 to i is sorted in desired manner and we increase the i and thus sorts the whole array | 2 |
2,823 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort, we select the smallest element from the array and put it in the first index of the array and then find the second smallest element and so on.\nin insertion sort, we first sort the subarray containing first and second array ,and when that is sorted we insert the third element in the position in which ... | 1 |
2,824 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort each and every element in unsorted portion of the array is compared with each and every element in sorted portion of the array and then swapping takes place whereas in selection sort we traverse an array the number of elements present in the array times and then minimum element is found out in each tr... | 1 |
2,825 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | or -1 is displayed which brings its worst case complexity of n. | 2 |
2,826 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort first the position is identified where element is to be inserted and then sorted comparing with next element\nin selection sort the initial element is separated and rest of the elements are compared and so on | 2 |
2,827 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort we divide array into two parts , 1st element and 2nd to last element in second , we one by one traversse \n | 2 |
2,828 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort is like sorting a deck of cards we are holding in our hand. We start with the first element and assume that it is sorted and then we start putting all the other elements in the correct places in the sorted array. By the time we reach the end of our array we have a sorted array. \n\nSelection sort woks on... | 1 |
2,829 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | The insertion sort inserts the values in a presorted file to sort a set of values.On the other hand, selection sort finds the minimum number from the list and sort it in some order. | 1 |
2,830 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort ,we simple the first element of the data structure to be sorted and we start our sorting from the second element by comparing it with the first while in selection sort we select the first element and compare it with coming elements and do the swaps as per our need. | 2 |
2,831 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In Insertion sort we first sort first two elements and then place or insert the next element in that sorted part at the correct place until the every elements are sorted.\n\nIn selection sort we select the first element and compare it with all the elements and find min and place it in the beginning and then we select ... | 2 |
2,832 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | at each and every position of the array and if value of any position == a, then we need to return it. This is what called linear searching. | 1 |
2,833 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort : first element is key and the next element is checked while it is smaller than key based on that pushes it towards the front of the array.\nselection sort : this technique is based on swapping principle wherein it linearly picks one element and searches the smallest element in the entire array.\nselecti... | 2 |
2,834 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort , the elements are inserted at the start and then positioned according to the increasing or decreasing order. While in selection sort , the entire array is traversed and checks for its position. Both have different time complexities. | 1 |
2,835 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort, we simply divide our data structure in two parts one is sorted and second unsorted. And then add first element in sorted one and assume that it is sorted and then we traverse our data structure and update the the two parts on traversing . It is like how we arrange playing cards. \n\nIn selection sort... | 1 |
2,836 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort we take the first element as key and check with the next element and keep on repeating. while in selection sort we take the first element and check it with the whole array to decide its position in the array and keep on repeating the process. | 1 |
2,837 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort takes a new blank array and then places the elements in sorted order in the array. It picks up the array elements of the given array one after the other in the given order.\nselection sort on selects the elements of the given array and sort them in the given array itself. | 1 |
2,838 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort is the sorting algorithm which uses the card method of sorting in which means put the element at its correct location with simultaneously using the swap.\nSelection sort is the sorting algorithm which finds the minimum element in the entire array and then insert it to the first position and we simultaneo... | 1 |
2,839 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort you take a element and compare it with all the elements occurring before it in the array and place it accordingly in the array and repeat if for rest of the elements\nin selection sort you select a element and place it at specific position it should have in sorted array | 1 |
2,840 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | They are different based on their worst case time complexity. | 1 |
2,841 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort it divides the array and then place the first element on the right place in first array, and then increasing the size of first array it keeps on repeating the same process until it reach the end of array, however in selection sort , it will find the lowest or highest element and replace it by first el... | 1 |
2,842 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion Sort has a pivot while selection sort does not have a pivot. | 1 |
2,843 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Linear searching is a way of searching in an array which takes O(N) time. In this type of searching, we iterate the array and check whether the required element is present in the array or not. If the element is present, it returns 1 else it returns 0(if boolean function of linear searching is made) | 1 |
2,844 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort and selection sort works differently as in one chooses a pivot and sorts accordingly while the other doesn't. | 1 |
2,845 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort have time complexity of O(nlogn) whereas selection sort has time complexity of O(n) | 1 |
2,846 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort when we find the element greater let us say B from an element A then we insert B right after A shifting the rest of the array by one place making room for B. In selection sort we swap instead. So the difference is in the swapping. | 1 |
2,847 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort, the smaller elements are moved to the left and the bigger elements to the right.\nTime complexity = O(n) in best case\nIn selection sort, each element is compared with the rest of the elements in the list/array and the smallest is brought to the front.\nTime complexity= O(n^2) in best case | 1 |
2,848 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in selection sort we find the exact position of the data and in ins | 1 |
2,849 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In inser | 0 |
2,850 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In Insertion sort, the element is picked and placed as per desired neighbor set\nWhere as, In Selection sort, we find the exact place of the selected data | 1 |
2,851 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In the selection sort we find the min. number from the given array of list and sort them in order while in the insertion sort we insert the values in an array and save it in another array to sort a set of values. | 1 |
2,852 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | selection sort uses the approach of divide and conquer on the problem statement to solve it as parts and later combine them later when the task is complete , while insertion sort works in a different manner. | 1 |
2,853 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | As the name suggests insertion helps in inserting the given data and then sorting accordingly unlike selection sort helps in choosing the data we require to find | 1 |
2,854 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort we use to insert the data and directly arrang them in the sort way. And in selection sort we use to sort the particular data that is already inserted. | 1 |
2,855 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | insertion sort inserts values in a already sorted file to sort a set of values. whereas, selection sort finds the minimum number from the list and sort it in a given order. | 1 |
2,858 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort you put every element at its correct position and in selection sort you find the next min or max element in rest of the array and swap it with the current element | 1 |
2,859 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort, we take an element from an array and insert it in the correct position of an array and it is a linear search. in this we divide array into sorted and unsorted and take the first element and sort them into the unsorted array\nIn selection sort, we divide array into sorted and unsorted array and pick a... | 1 |
2,860 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in selection sort we use two for loops to find the position of a element one by one, whereas in insertion sort we can exchange two continous element depending on which is smaller, and we keep on doing this until the array is sorted | 1 |
2,862 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Insertion sort and selection sort are two popular sorting algorithms, and their main difference lies in how they select and place elements in a sorted sequence manner. | 1 |
2,863 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | basic difference between the two is thst selection sort is a linear sort which runs on comparing each element with one predefined minimum or maximum element whereas insertion sort works on divide and conquer technique. | 1 |
2,864 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Selection sort is a technique in which we find out the smallest element in whole array and swap it with element present at 1st position and so on till the end, so it takes O(n^2) time, whereas insertion sort is a technique in which you assume that only first element is present first and for second element you shift acc... | 1 |
2,865 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | time complexity of insertion sort is O(n*n) as two for loops are used in it. It takes the element which is present in the first index than it compare with other elements than perform the swap operation at each index.\nwhereas Selection sort compares the two adjacent element and perform the swap operations , it also has... | 1 |
2,866 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort we insert the element in correct position iteratively and in selection sort we comapre to element to place a element in correct position iteratively. | 1 |
2,867 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In selection sort, the input array is divided into two parts: a sorted part and an unsorted part.\nThe algorithm repeatedly finds the minimum element in the unsorted part and swaps it with the leftmost element of the unsorted part, thus expanding the sorted part by one element.\nSelection sort has a time complexity of ... | 1 |
2,868 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort we pick the min element and put it in front of our array and repeat the process for remaining\n\nin selection sort we pick the adjacent elements and compare them and swap if first element is bigger than the second than we perform swap operation on them | 1 |
2,869 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | In insertion sort we find the minimum element and place it to its correct position and decrease the size of traversing array\nIn selection sort we find the maximum element and place it to its correct position and decrease the size of traversing array | 1 |
2,870 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | in insertion sort we basically insert elements in the starting by removing elements from the last and applying the sorting algorithm \nand in selection sort we basically make the adjacent swaps and apply the sorting algorithm | 1 |
2,871 | How insertion sort and selection sorts are different? | Both sorting techniques maintains two sub-lists, sorted and unsorted and both take one element at a time and places it into sorted sub-list. Insertion sort works on the current element in hand and places it in the sorted array at appropriate location maintaining the properties of insertion sort. Whereas, selection sort... | Queues work in the way of LIFO (Last in first out ) method. It is a data structure which is used to efficiently manipulate data in a way such that the element on the top of the stack goes out and when output is displayed or accessed and there when we input any element in the stack, it goes on last of it. Any algorithm ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.