Module 3: Linked List and Queue Flashcards

1
Q

It is a sequence of data structures, which are connected together via links

A

Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or false: Each link contains a connection to another link

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the second most-used data structure after array?

A

Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What stores data or elements in a linked list?

A

Link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Each link of a linked list contains a link to the next link called?

A

Next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A ____ contains the connection link to the first link called First

A

Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is being described:
1. Contains a link element called First
2. Carries data fields and a link field called next
3. Link is linked with its next link using its next link
4. Last link carries a link as null to mark the end of the list

A

Linked list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the different types of linked list?

A

Simple Linked List
Doubly Linked List
Circular Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Item navigation is forward only

A

Simple Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Items can be navigated forward and backward

A

Doubly Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Last item contains link of the first element as next and the first element has a link to the last element as previous

A

Circular Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the basic operations supported by a linked list?

A

Insertion, Deletion, Display, Search, Delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Adds an element at the beginning of the list

A

Insertion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Deletes an element at the beginning of the list

A

Deletion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Displays the complete list

A

Display

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Searches an element using the given key

A

Search

17
Q

Deletes an element using the given key

A

Delete

18
Q

Variation of a linked list where navigation is possible both ways

A

Doubly Linked List

19
Q

Terms in doubly linked list:

A

Link, Next, Prev, LinkedList

20
Q

True or False: Infix notations are first converted to postfix or prefix notations and then computed

A

True

21
Q

This is the way to write arithmetic expressions

A

Notation

22
Q

Notation where operators are used in-between operands

A

Infix Notation

23
Q

Notation where operators are written ahead of operands

A

Prefix/Polish Notation

24
Q

Notation where the operator is written after the operands

A

Postfix/Reversed Polish Notation

25
Q

What to consider in converting infix notation to prefix or postfix notation?

A

Precedence of operators (PEMDAS),
Associativity (Left Associative)

26
Q

Abstract data structure similar to stacks, but it is open at both ends

A

Queue

27
Q

Add (store) an item to the queue

A

Enqueue

28
Q

Remove (access) an item from the queue

A

Dequeue

29
Q

True or False: Queue can be implemented using arrays, linked lists, pointers, and structures

A

True

30
Q

Operations in queue:

A

peek()
isfull()
isempty()

31
Q

Checks if the queue is full

A

isfull()

31
Q

Gets the element at the front of the queue without removing it

A

peek()

32
Q

Checks if the queue is empty

A

isempty()

33
Q

What pointer is used to dequeue or access data?

A

Front pointer

34
Q

What pointer is used to enqueue or store data

A

Rear pointer

35
Q

Steps in enqueuing:

A
  1. Check if full
  2. If full -> return 0;
  3. If not full, increment rear pointer to the next empty space
  4. Add data element
  5. Return success
36
Q

Steps in dequeuing:

A
  1. Check if empty
  2. If empty, return 0;
  3. If not empty, access data pointed by front pointer
  4. Increment front pointer to the next available data element
  5. Return success