What is the complexity of concatenating a single linked list of length n to a single linked list of length m (m > n)?

a. O(m)
b. O(n)
c. O(1)
d. O(n+m)


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

Computer Science & Information Technology

You might also like to view...

Most digital cameras use ________ for storage

A) FireWire B) flash memory C) mini-DVDs D) an external hard drive

Computer Science & Information Technology

Of the following, which is the fastest type of Internet connection?

A. dial-up B. voiceband C. DSL D. cable

Computer Science & Information Technology

Every object on a slide, whether it is a text object, a shape, a chart, a picture, or any other object, is ____________________ on the slide in the order it was created.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Both the Cancel button and the Enter button appear on the formula bar when you begin typing in a cell.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology