DSA1 (1)
DSA1 (1)
27. Difference Singly, Doubly Linked 31. Queue: A queue is a linear list of
List: elements in which data can only be
Singly Linked List (SLL): 1.Singly inserted at one end, called the rear
linked list allows us to go one way and deleted from other end, called the
direction. 2.Singly linked list uses less front. Advantages of Queues:
memory per node (one pointer). 3. 1.Queues are flexible, requiring no
Complexity of Insertion and Deletion at communication programming.
known position is O(n). 4.Singly linked 2.Adding or removing elements can be
list is unidirectional i.e., only one done quickly. 3.Queue is used in many
direction. applications such as printing
Doubly Linked List (DLL): 1.Doubly documents. 4.Queue provides first-in,
linked list has two way directions next first-out access.
and previous. 2.Doubly linked list uses
32. TYPES OF QUEUE:
more memory per node. 3.Complexity
1.Linear Queue: A queue is a linear
of Insertion and Deletion at known
data structure in which data can only
position is 0(1). 4.It is bidirectional.
be inserted at one end, called the rear,
28.GENERALIZED LINKED LIST: is and deleted from the other end, called
defined as, “a finite sequence of n>=0 the front. 2.Circular Queue: In a
elements, a1, a2, a3, ..., an, such that circular queue, all nodes aretreated as
circular. Last node is connected back to
the first node.
3.Dequeue (Double Ended Queue): In
Double Ended Queue, insert and
delete operation can be occur at both
ends that is front and rear of the
queue. 4.Priority Queue: Priority
queue contains data items which have
some preset priority.
33. Round Robin Algorithm: The
Round Robin (RR) algorithm is one of
the CPU scheduling algorithms
designed for the time sharing systems.
In RR algorithm, the CPU is allocated to
a process for a small time inter val
called time quantum.