Friday, July 29, 2022

What are various types of data structures?

Unlike we deal with various data access tools in real life like phone directory, dictionary, geographical map. In world of computer science we have various tools available in data structure. let us discuss various types of data-structure.

Array : Array are collections of data items of same type, stored together in continuous memory location. Each data item is known as "element". array are the most basic type of fundamental data structure. Arrays are linear data structure.

Graphs : Graph data structure contains data in the form of nodes and edges. each nodes connects each other by edges. graph is non-linear data structure. 


Hash Tables : Hash-table is data-structure which stores data in key-value pair. this is structure normally builds internally using arrays. hash table maps keys to value.  hash table non-linear data structure.



Linked List: Liked list data structure stores data in node, each node consist of data field and reference (address) of next node in list. it is a linear data-structure but does not require continuous memory location.


Stack : Stack data structure stores data in LIFO (Last In First Out) order, this is a linear data structure. it used the term push and pull while using. push is used to put data in stack and pull is used to retrieve data from stack.                

 Queue : Queue data structure stores data in FIFO (First In First Out) order, this is a linear data structure.


Tree : Tree stores data elements in hierarchal order. tree is multilevel data-structure that uses nodes. the bottom nodes call "leaf nodes" and top most node called as "root nodes". each nodes have reference (address) of next and previous nodes.



Trie : Not to be confused with a Tree, Tries are data structures that store strings like data items and are placed in a visual graph. Tries are also called keyword trees or prefix trees. Whenever you use a search engine and receive autosuggestions, you’re witnessing the trie data structure in action.







What Is Data Structure In Computer Science ?

Data structure is method of storing, managing and organizing data into computer memory in such a way that program at runtime can easily access and process the data effectively.

Like in old days think about telephone diary or Dictionary where data is organized in such a way that anyone can get the records, words were organized and sorted alphabetically, also index were present in start of book to guide person how fast they can directly go to that page what they are looking for.

Same way in computer world since data is huge so there are so many methods are available to access and process data which is classified under Data structure and Algorithm.

Data structure algorithms are written under various language like C, C++, JAVA and Python etc. to help programmer to write efficient program. these language provide ready to use template which is called as  Abstract Data Type (ADT) which can be used by programmer to write code like Linked-List, Array etc.

    
                                                NEXT >>













 

What are various types of data structures?

Unlike we deal with various data access tools in real life like phone directory, dictionary, geographical map. In world of computer science ...