Data Structures You Should be Knowing as a Web Developer
1) Array
An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.
- Creating an Array
- Iterating
- Find an Element
- Insert Element(s)
- Delete Element(s)
- Filter an Array
- Fetch a Sub-Array
- Merging Arrays
2) Set
A set is a data structure that can store any number of unique values in any order you so wish.
- Creating a Set
- Iterate through Set
- Get an Element
- Insert Element(s)
- Delete Element(s)
- Verify Existence
- Merging Sets
3) Stack
A stack is an Abstract Data Type (ADT), commonly used in most programming languages. It is named stack as it behaves like a real-world stack, for example, a deck of cards or a pile of plates, etc.
- Creating a Stack
- Push an Element to a Stack
- Pop an Element from a Stack
4) Queue
The queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue is open at both ends. One end is always used to insert data and the other is used to remove data. Queue follows First-In-First-Out methodology, i.e., the data item stored first will be accessed first.
- Creating a Queue
- Insert an item to Queue
- Remove an item from Queue
5) Hash Table
Hash Table is a data structure that stores data in an associative manner. In a hash table, data is stored in an array format, where each data value has its unique index value. Access to data becomes very fast if we know the index of the desired data.
- Creating a Hash Table
- Inserting an Entry
- Deleting an Entry
- Getting Value for a Key
- Checking if a key exists
6) Tree
A tree is non-linear and a hierarchical data structure consisting of a collection of nodes such that each node of the tree stores a value, a list of references to nodes
- Creating a Tree
- Traversing through Tree
- Fetch subtree
- Fetch siblings
- Add an Element
- Remove an Element