Medium
What is the name of the type of sort performed by the following code?
function sortArray(examNotes) {
For i ranging from size of examNotes-1 to 1
{
For j ranging from 0 to i - 1
{
If examNotes[j+1] < examNotes[j]
{
swap(examNotes[j+1], examNotes[j]);
}
}
}
}
Author: KahinaStatus: PublishedQuestion passed 126 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
9
What is recursion?6
What is special about quick sort?2
What do you call a structure whose data are nodes and linked together by oriented arcs?6
What type of structure are the results of a recursive function stored in?5
What does the While loop do?2
What about the merge sort method?2
Given an array of 17 elements sorted in ascending order, what is the cost of accessing the element with index 10?