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

17
Q

Deletes an element using the given key

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

21
Q

This is the way to write arithmetic expressions

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
What to consider in converting infix notation to prefix or postfix notation?
Precedence of operators (PEMDAS), Associativity (Left Associative)
26
Abstract data structure similar to stacks, but it is open at both ends
Queue
27
Add (store) an item to the queue
Enqueue
28
Remove (access) an item from the queue
Dequeue
29
True or False: Queue can be implemented using arrays, linked lists, pointers, and structures
True
30
Operations in queue:
peek() isfull() isempty()
31
Checks if the queue is full
isfull()
31
Gets the element at the front of the queue without removing it
peek()
32
Checks if the queue is empty
isempty()
33
What pointer is used to dequeue or access data?
Front pointer
34
What pointer is used to enqueue or store data
Rear pointer
35
Steps in enqueuing:
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
Steps in dequeuing:
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