In a typical application using Database, it is natural all...
Read MoreBlog
Data Structures for Programmers
- February 28, 2022
- Posted by: techjediadmin
- Category: Algorithms Data Structures Programming
No Comments
What is a Data Structure?
We will not be talking about data structures implementation in this post, but about their usage or choice during programming. As usual lets start from the basic definition. Data Structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
They can be broadly classified as primitive, composite, abstract data structures. Primitive structures are the basic units of storage like boolean, integer, float, and double. These are not that significant when compared to other types. Let’s discuss their usage.
Common usage of Data Structures
Data structure | Usage |
Array | When index (position) based access is needed in your program while accessing a collection of same data type |
List | When there is a need for accessing a collection of same data type and need of dynamically growing collection |
Stack | When there is a need for implementing undo\redo operation (like in word processors) |
Queue | When there is a need for implementing some ordering based on some attribute especially FIFO type of operation. There are lot of variations but important one is the ‘Priority queues’, which is used for process scheduling in many OS kernels |
Tree | For complex requirements like building a Parsers, Filesystem, IP routing table, 3D computer graphics with many layered objects |
Heap (Minheap, Maxheap) | Mostly used in Greedy based algorithms |
Graph | When there is need to represent or model — connections/relations in social networking sites, Routing, networks of communication |
Hash Table | When requirement is ‘fast data lookup’. Symbol table for compilers, database indexing, caches uses Hash table in their implementation |
Trie | When you need to implement auto-completion and spell-checking kind of functionality |
Read Similar Blogs:
Google Authenticator
Google Authenticator is a mobile app that provides two-factor authentication...
Read MoreHow does Serverless Architecture work?
TL;DR: Serverless removes the architecture responsibilities like hardware provisioning, scaling, and...
Read MoreLeave a Reply Cancel reply
Courses
Data Structure & Algorithms for Interviews
Start Date : 24-September-2022
End Date : 27-November-2022
Technology80 Hours10 Weeks
Become a Python Developer
Start Date : 13-August-2022
End Date : 11-September-2022
Technology40 Hours5 Weeks