Practical example of data-structures in computer study?

12,724

Some examples:

  1. Stack - Undo functions use this to pop most recent action off top of stack, then second most recent, etc.
  2. Queue - Process Scheduling normally uses a queue (how processes or threads are accessed after the initial work varies though)
  3. Tree - Directory traversal
  4. Binary search tree - searching quickly for a given element
  5. Graph - stores data so that you can think of it as a mathematical "plane" where the data is plotted. It is effective at representing (possibly) very complicated relationship between data, since (if you look at the image in the link) multiple "links" can exist between more than two pieces of data, as opposed to a linked list where you can only have a link to your left and to your right.
  6. Hash map - Searching for certain blocks of memory (i.e. when using many pointers) Hashing occurs when you have, say, an address book on your computer. It might use a hash map so that when you enter John Smith, his phone number and other information are available. This is because there is a hashing function that points to a certain location in memory when "John Smith" is entered. It would be a headache entering a memory address every time you wanted to access some simple information.
  7. Linked List - singly linked list offers movement in one direction between elements, doubly linked list offers movement back and forth between elements, and Circular linked list offers Circular navigation of similar objects (processes are one example) Use this when you want to be able to navigate between elements, because each element is linked to the next one and the one before it (for circular. noncircular linked lists have a beginning and an end). Imagine your web browser...you click "back" to go to the previous page, and you can click "forward" to go to the next. You can think of this as a linear linked list. A photo slide show that goes to the next or previous photo and then eventually starts at the beginning can be thought of as a circular linked list. (They're not necessarily implemented like that but it's a good way to visualize it)

Edited as per OP's request for more info on last structures.

Share:
12,724
Vishwanath Dalvi
Author by

Vishwanath Dalvi

SOreadytohelp about me box is kept "", intentionally.

Updated on June 05, 2022

Comments

  • Vishwanath Dalvi
    Vishwanath Dalvi over 1 year

    My Friend faced an interview of IT company where they asked him Give Practical example of each data structure how this data structure can be used in computer study ??

    Data Structures

    1. Stack
    2. Queue,Circular Queue
    3. Linked List,Doubly Linked list,Circular Linked list
    4. Tree,Binary Search Tree
    5. Graph
    6. Map and others like searching and sorting

    (for example in Operating system for maintaing process queue [Queue data structure is used]like this for all others)

    Example Related to Software Implementation and Computer Science,Operating system etc.

    hoping for positive response