Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 1.56 KB

File metadata and controls

44 lines (36 loc) · 1.56 KB

img

Singly linked lists quizes

Question #0

Arrays Vs Linked Lists: select all true statements

  • Memory is aligned for an Array - each elements are back to back in the memory
  • We can easily remove an element from an Array
  • Linked list can contain as value a structure
  • We can add elements indefinitely to an array
  • Memory is aligned for a Linked list - each elements are back to back in the memory
  • We can add elements indefinitely to a linked list
  • We can easily removed an element from a Linked list
  • Array can contain as value a structure

Question #1

What’s the “head” of a linked list?

  • It’s the first node
  • It’s the last node
  • It’s the node with the highest value
  • It’s the node with the pointer to the next equals to NULL
  • It’s the node with the lowest value

Question #2

What’s the “tail” of a linked list?

  • It’s the node with the highest value
  • It’s the node with the pointer to the next equals to NULL
  • It’s the first node
  • It’s the node with the lowest value

Question #3

What’s a node? (select all possible answers)

  • It’s a cell in an array
  • It’s a server
  • It’s a structure with a pointer to the next node and value information
  • It’s a space allocated in memory
  • It’s an integer

Question #4

In a singly linked list, what are possible directions to traverse it? (select all possible answers)

  • Forward
  • Backward