Can someone simply explain what stacks, queues, linked lists, and hash tables are, and what they are used for?
Stack:It is a data structure in which the collection of objects or collection of elements is done.It is a linear data structure and involves two operations PUSH and POP.In PUSH operation the elements are inserted into the stack and By POP operation elements are removed from the stack.It follows LIFO mechanism.Thats last element to be added into the stack will. Be the first to be removed.It is used in expression handling and coverting infix expressions to prefix and postfix which are used in describing expressions.It is also used in function call and in return the process to the function being called upon.
Linked list: It is a linear data structure that contains items.In linked lists,there is a sequence of links and they connected to other in a sequence.They hold data in the objects called nodes and are the most effecient when it comes to insertion and deletion.They are iftypes Single,double and circular linked list.They are used in maintaining directories, implementing stack,queues and other structures and in dynamic memory location.
Queue:It is a linear data structure used for collecting entities and storing objects.It is similar to stack.In queues first element is inserted on the REAR side and last element removed from FRONT side and involves operations enqueue and dequeue for insertion and deeletion of elements.Queues are widely used in synchronisation of process,cpu scheduling and disk scheduling.
Hash tables:It is data structure that stores key value pairs.Each key is associated with a value.It uses a hash function for computing or indexing.Hash tables are used in associative arrays,caches and in database indexing of elements and in sets.
Please login or Register to submit your answer