0% found this document useful (0 votes)
26 views1 page

Q9. Bubble Sort Is Implemented Using A Technique That Repeatedly Compares Adjacent Pairs

The document discusses two multiple choice questions. The first question asks about the data structure queue and gives the options FIFO, LFU, LIFO, and LRU, with FIFO being the correct answer. The second question is about bubble sort and asks for the total number of comparisons needed to sort a list of n elements, with the answer being n(n+1)/2.

Uploaded by

Marvin Marquez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Q9. Bubble Sort Is Implemented Using A Technique That Repeatedly Compares Adjacent Pairs

The document discusses two multiple choice questions. The first question asks about the data structure queue and gives the options FIFO, LFU, LIFO, and LRU, with FIFO being the correct answer. The second question is about bubble sort and asks for the total number of comparisons needed to sort a list of n elements, with the answer being n(n+1)/2.

Uploaded by

Marvin Marquez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

queue as a data structure?

a) FIFO b) LFU c) LIFO d) LRU

Q9.

Bubble sort is implemented using a technique that repeatedly compares adjacent pairs of elements from left to right and swaps them if they are in the wrong order. Which of the following is the total number of comparisons for sorting a list of n elements? n 2 n(n + 1) 2 n(n 1) c) 2
n 2
2

a)

b)

d)

queue as a data structure? a) FIFO b) LFU c) LIFO d) LRU

Q9.

Bubble sort is implemented using a technique that repeatedly compares adjacent pairs of elements from left to right and swaps them if they are in the wrong order. Which of the following is the total number of comparisons for sorting a list of n elements? n 2 n(n + 1) 2
n(n 1)
n
2

a)

b)

c)

d)

You might also like