1. You are given a link based list with n number of elements . Select all true statements:   Group of answer choices   Best case access to an element is Θ(1)   given a pointer to a suitable location in the list, running time for removing a node at that location is Θ(n) on average.   worst case access to an element is Θ(n)   given a pointer to a suitable location in the list, running time for inserting a node at that location is Θ(n) on average   given a pointer to a suitable location in the list, running time for inserting a node at that location is Θ(1) on average   2. Consider the concept of the list data structure. Select all true statements about a list:   Group of answer choices   The number of elements currently stored is called the length of the list   The element inside are ordered in the sense of sorted order   A list is said to be empty when it contains no elements   The end of the list is called the tail.   The beginning of the list is called the head   3. Consider an array-based list implementation. Inserting a new element to the current position in which the current position is at the begenning of the array takes:   Group of answer choices   Θ(nlog(n)) time   Θ(log(n)) time   Θ(1) time   Θ(n2) time   Θ(n) time   4. True or False? In a linked list, the successive nodes in the list must occupy contiguous space in memory.   Group of answer choices   True   False   5. What data structure is associated with the term LIFO?   Group of answer choices   a stack   an array based list   a queue   a doubly linked list   a singly linked list

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 18SA
icon
Related questions
icon
Concept explainers
Question

1. You are given a link based list with n number of elements . Select all true statements:

 

Group of answer choices

 

Best case access to an element is Θ(1)

 

given a pointer to a suitable location in the list, running time for removing a node at that location is Θ(n) on average.

 

worst case access to an element is Θ(n)

 

given a pointer to a suitable location in the list, running time for inserting a node at that location is Θ(n) on average

 

given a pointer to a suitable location in the list, running time for inserting a node at that location is Θ(1) on average

 

2. Consider the concept of the list data structure. Select all true statements about a list:

 

Group of answer choices

 

The number of elements currently stored is called the length of the list

 

The element inside are ordered in the sense of sorted order

 

A list is said to be empty when it contains no elements

 

The end of the list is called the tail.

 

The beginning of the list is called the head

 

3. Consider an array-based list implementation. Inserting a new element to the current position in which the current position is at the begenning of the array takes:

 

Group of answer choices

 

Θ(nlog(n)) time

 

Θ(log(n)) time

 

Θ(1) time

 

Θ(n2) time

 

Θ(n) time

 

4. True or False? In a linked list, the successive nodes in the list must occupy contiguous space in memory.

 

Group of answer choices

 

True

 

False

 

5. What data structure is associated with the term LIFO?

 

Group of answer choices

 

a stack

 

an array based list

 

a queue

 

a doubly linked list

 

a singly linked list

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Types of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning