You are on page 1of 6

NATIONAL INSTITUTE OF FASHION TECHNOLOGY

BHUBHANESWAR

ALGORITHM DESIGN
AND DATA STRUCTURE

ASSIGNMENT -2

SUBMITTED BY-
ARPITA SELOT
BFT/19/243
INDEX

 ADVANTAGES AND DISADVANTAGES OF LINKED LISTS

 ADVANTAGES AND DISADVANTAGES OF DOUBLE LINKED LISTS

 ADVANTAGES AND DISADVANTAGES OF CIRCULAR LINKED LISTS

 ADVANTAGES AND DISADVANTAGES OF STACKS

 ADVANTAGES AND DISADVANTAGES OF QUEUES

 PRACTICAL APPLICATIONS OF QUEUES

 BIBLIOGRAPHY
LINKED LISTS-
ADVANTAGES-

 A linked list is a dynamic data structure therefore, the primary advantage of linked lists
is that linked lists can grow or shrink in size during the execution of a program.

 There is no need to specify how many number of nodes required so linked list does not
waste memory space. We can allocate and de-allocate memory space at runtime.
 The most important advantage is that the linked lists provide flexibility is allowing the
items to be rearranged efficiently. In linked list it is easier to insert or delete items by
rearranging the pointers but in arrays insertion and deletion requires large movement
of data.

DISADVANTAGES-
 In single link list nodes are connected using a single pointer to point to the next
node. If the link list is accidentally destroyed then the chances of data loss after
the destruction point is maximum. Data recovery is not possible.
 In single link list every node contains a single pointer to represent next node So we
can move only forwardly. Backward movement is not possible without recursion.
 In single link list any operations is performed sequentially and so for a huge no of
data item any operation can be very slow.
 Link list cannot contain detail description about its own as total number of node,
Total no of deleted nodes, total number of updated nodes etc. Without any
operation user can not display the detail description about the link list.

DOUBLE LINKED LISTS (DDL)-


ADVANTAGES-
 A DLL can be traversed in both forward and backward direction.

 The delete operation in DLL is more efficient if pointer to the node to be deleted is
given.
 We can quickly insert a new node before a given node.

DISADVANTAGES-
 Every node of DLL Require extra space for a previous pointer.
 All operations require an extra pointer previous to be maintained. For example, in
insertion, we need to modify previous pointers together with next pointers.

CIRCULAR LINKED LISTS


ADVANTAGES-

 If we are at a node, then we can go to any node. But in linear linked list it is not possible
to go to previous node.
 It saves time when we have to go to the first node from the last node. It can be done in
single step because there is no need to traverse the in between nodes. But in double
linked list, we will have to go through in between nodes.

DISADVANTAGES-

 It is not easy to reverse the linked list.


 If proper care is not taken, then the problem of infinite loop can occur.
 If we at a node and go back to the previous node, then we cannot do it in single step.
Instead we have to complete the entire circle by going through the in between nodes
and then we will reach the required node.

STACKS
ADVANTAGES-

 Easy to get started


 Low Hardware Requirement
 Cross- Platform
 Anyone with access can edit the program
DISADVANTAGES-
 Inflexible
 Lack of scalability
 Unable to Copy & Paste

QUEUES
ADVANTAGES-
 Queues have the advantages of being able to handle multiple data types and they are
both flexible and flexibility and fast.
 Moreover, queues can be of potentially infinite length compared with the use of fixed-
length arrays.

DISADVANTAGES-
 A major disadvantage of a classical queue is that a new element can only be inserted
when all of the elements are deleted from the queue.

As an example, consider the queue:

Now, if the first three members are de-queued from the front (left hand side) of the queue, we
get:

Where the queue remains full but we cannot insert a new element because the back of the
queue (right hand side) remains as it was before.
PRACTICAL APPLICATIONS OF QUEUES
REAL WORLD APPLICATIONS-
 Cashier line in any store
 Checkout at any book store
 People on an escalator

APPLICATIONS RELATED TO COMPUTER SCIENCE-

 Queue is useful in CPU scheduling, Disk Scheduling. When multiple processes require
CPU at the same time, various CPU scheduling algorithms are used which are
implemented using Queue data structure.
 When data is transferred asynchronously between two processes. Queue is used for
synchronization. Examples: IO Buffers, pipes, file IO, etc.
 Print Spooling. In print spooling, documents are loaded into a buffer and then the
printer pulls them off the buffer at its own rate. Spooling also lets you place a number
of print jobs on a queue instead of waiting for each one to finish before specifying the
next one.
 Breadth First search in a Graph .It is an algorithm for traversing or searching graph data
structures. It starts at some arbitrary node of a graph and explores the neighbor nodes
first, before moving to the next level neighbors.
 Handling of interrupts in real-time systems. The interrupts are handled in the same
order as they arrive, First come first served.

BIBLIOGRAPHY-

 csgeek.wordpress.com
 www.slideshare.net
 www.geeksforgeeks.org
 stackoverflow.com
 www.lynda.com
 www.techwalla.com
 cseway.blogspot.com

You might also like