Inserting a new node at the beginning of the linked list is faster than inserting a new node at the end of the list (assuming there is no pointer to the end of the list) because:

A. the beginning of the linked list is less complicated than the end of the linked list
B. inserting at the beginning doesn’t require a loop, and it can be done in O( 1 ) time; inserting at the end requires a loop and is done in O( n ) time
C. if you insert at the end, all of the nodes must be slid one place to the left; if you insert at the beginning, you just insert
D. the operating system can quickly access the address at the beginning of the linked list; the address at the end of the linked list is likely to be high, and the operating system will spend a lot of time trying to figure out what it is

B

Computer Science & Information Technology

You might also like to view...

iOS was developed by ________ as the operating system for its tablets and smartphones

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ________ contains commands placed in groups that are organized by tabs

Fill in the blank(s) with correct word

Computer Science & Information Technology