Arrays and Linked Lists

Download Q&A
Q. In a circular linked list, what is the main characteristic?
  • A. Last node points to null
  • B. First node points to last node
  • C. All nodes are connected in a circle
  • D. None of the above
Q. In a singly linked list, how do you delete a node given only access to that node?
  • A. Set the node to null
  • B. Copy the next node's data
  • C. Change the previous node's pointer
  • D. You cannot delete it
Q. What is the primary advantage of using a linked list over an array?
  • A. Faster access time
  • B. Dynamic size
  • C. Better memory locality
  • D. Easier sorting
Q. What is the time complexity of merging two sorted arrays?
  • A. O(n)
  • B. O(n log n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the worst-case time complexity for searching an element in an unsorted array?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. Which data structure allows for efficient last-in, first-out (LIFO) operations?
  • A. Queue
  • B. Array
  • C. Stack
  • D. Linked List
Q. Which data structure is more memory efficient for storing a list of elements?
  • A. Array
  • B. Linked List
  • C. Both are equal
  • D. None of the above
Q. Which of the following is a characteristic of arrays?
  • A. Dynamic size
  • B. Random access
  • C. Non-contiguous memory allocation
  • D. No fixed size
Q. Which of the following is a disadvantage of using arrays?
  • A. Fixed size
  • B. Random access
  • C. Easy to implement
  • D. Memory locality
Q. Which of the following operations can be performed in constant time on an array?
  • A. Insertion at end
  • B. Deletion from beginning
  • C. Accessing an element
  • D. Insertion at beginning
Q. Which of the following operations is NOT efficient for linked lists?
  • A. Insertion at head
  • B. Insertion at tail
  • C. Accessing an element by index
  • D. Deletion from head
Showing 1 to 11 of 11 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely