First of all
What are Data Structures?
Data structures are the techniques for storing and organizing the data which makes it easier for modify,navigate and to access the data. It determines how data is collected and stored and also maintains the relationship between the data. They are used in almost all areas of computer programming languages and technologies. Let see some of the data structures
Array is the basic of all the data structures , an array can stores data in the memory and keep their for the later use. Each array contains fixed number of cells which are decided on its creations and each cell contains an numeric corresponding index.
- These are simple to create and use
- It is a foundational building blocks for complex data structures
They are similar to stacks , both queues and stacks are sequential structures but queues processes elements in order they were entered rather then the most recent element . They are helpful as a buffer for request and storing each request in order it was received until it can be processed.
- They have dynamic size
- Low runtime
- Orders data in the order it was received
These are the data structures which does not uses any physical placement of data in the memory. It means that , rather than indexing or positioning, linked lists use this as a referencing system and elements are stored in nodes that contain pointers to the next node, repeating until all the nodes are linked. This kind of system allows efficient insertion and removal of items without any need if reorganization.
- Less complex then restricting an array
- Efficient insertion and removal of new elements
Trees are the relaton-based data structure , which specialize in representing the hierarchical structures/ Like linked lists , the node contains both elements of data and pointers which marks its relations to immediate nodes. Nodes with linked child nodes are called internal nodes and nodes without child nodes are called external Nodes.
- It has dynamic size
- It is very ideal for storing hierarchical relationships
- Quick at insert and delete operations
These are the important data structures concepts that every JS developers should know while developing any project