In a bubble sort for list of length n, the first step is to compare elements ____.

A. list[0] and list[n]
B. list[0] and list[n-1]
C. list[0] and list[1]
D. list[n-1] and list[n+1]

Answer: C

Computer Science & Information Technology

You might also like to view...

The battery on the motherboard keeps information current in RAM

Indicate whether the statement is true or false

Computer Science & Information Technology

A pure virtual function is a member function

a) Whose declaration ends with = 0. b) That is used in a derived class only. c) That is used in a base class d) Takes no arguments e) Member form that is used to force all derived classes to implement that member function or be a pure virtual function member of the derived class.

Computer Science & Information Technology