Bubble Sort
1. Which of the following is an array?
2. Which of the following is an array sorted in ascending order?
3. Which of the following is not a sorting algorithm?
4. Consider the following array: A = [-1, 9, 4, 8] Identify A[2], i.e, the element with index 2 from the following (assume 0-indexed array).
5. Consider the following pseudo-code:
for i = 0 to 2
for j = 0 to i
print “*”
print newline
end
Predict the output of the above code.