Bubble Sort

1. Which of the following is an array?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. Which of the following is an array sorted in ascending order?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. Which of the following is not a sorting algorithm?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

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).
Explanation

Explanation

Explanation

Explanation

Explanation

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.
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation