Answer these parts regarding different sorts This is for Jav
Answer these parts regarding different sorts. This is for Java NetBeans, but i\'m not sure it matters
a) What are the commonalities and differences among the three different sorting methods – bubble sort, insertion sort, and selection sort.
b) How would you be able to identify which algorithm is in use based upon two or three snapshots of an array at consecutive points in time during the sorting process
Solution
Answer :
Three different sorting methods:-
1) bubble sort :-
bubble sort it uses a nested loop to repetitively common elements arranged in the largest elements one by one.
2) insertion sort:-
insertion sort It uses a nested loop to repetitively insert elements in the sorted sub-array.
3) selection sort:-
selection sort is to repetitively pick up in the smallest element in the right position
