Queue ADT

0.0(0)
Studied by 2 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/8

encourage image

There are no tags or description

Looks like no tags are added yet.

9 Terms

1
New cards

Queue

An ordered list of objects with its use limited to inserting elements at the end of the list and deleting elements from the start of the list

2
New cards

Creating Queue

Create a class which extends this list in order to create an object

3
New cards

add()

Operation in Queue Interface where insertion order is not retained in the PriorityQueue; elements are stored based on the priority order (ascending by default)

4
New cards

remove()

Operation in Queue Interface where if multiple, first occurrence are removed

5
New cards

poll()

Operation in Queue Interface that is used to remove the head and return it

6
New cards

Iterating the Queue

Operation in Queue Interface that convert the queue to the array and traversing using the loop; queue also has an inbuilt iterator

7
New cards

PriorityQueue

Provides a way to process the objects based on the priority

8
New cards

LinkedList in Queue Interface

Inherently implements the linked list data structure

9
New cards

PriorityBlockingQueue

Alternative implementation if thread-safe implementation is needed