What is the complexity of concatenating two single linked lists?

a. O(n)
b. O(1)
c. O(n^2)
d. O(log(n))


a. O(n)
We need to traverse the first list to find the last element and add a pointer to the second list.

Computer Science & Information Technology

You might also like to view...

A set of programming language statements that perform a specific task is a(n)

a. pseudocode chart b. source code c. object d. procedure

Computer Science & Information Technology

In distinguishing an expression as true or false, C++ sees which of the following as true?

a. true b. 0 c. 1 d. Any non-zero value e. The character 'F'

Computer Science & Information Technology

Convert octal 426 to decimal.

What will be an ideal response?

Computer Science & Information Technology

The ping command uses ARP requests. True or false?

a. True b. False

Computer Science & Information Technology