Skip to content

kinshuk-code-1729/Data-Structures-and-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👀 This repository contains various codes of Data Structures and Algorithms from GFG, Leetcode and Hackerrank.

DSA Image

🎆 What is a data structure ?

  • A data structure is a special way of organizing and storing data in a computer so that it can be used efficiently.
  • Array, LinkedList, Stack, Queue, Tree, Graph etc are all basic data structures that store the data in a special way so that we can access and use the data stored in them efficiently.

🎇 Why do we need data structures ?

  • Data structures are used in almost every program or software system.
  • Specific data structures are essential ingredients of many efficient algorithms, and make possible the management of huge amounts of data, such as large integrated collection of databases.
  • In software design, Data structures are known to be major factors for collection, storing and organizing of data rather than algorithms in some programming languages.
  • Often Data structures are used in the combination of algorithms.

✨ How are data structures used in programming language ?

  • The data structure is not any programming language like C, C++, Java, etc.
  • It is a set of algorithms that we can use in any programming language to structure the data in the memory.
  • To structure the data in memory, 'n' number of algorithms were proposed, and all these algorithms are known as Abstract data types.

⭐ Classification of Data Structure :

classification of DS

  • Linear data structure : Data structure in which data elements are arranged sequentially or linearly, where each element is attached to its previous and next adjacent elements, is called a linear data structure.
    Examples of linear data structures are array, stack, queue, linked list, etc.

    • Static data structure : Static data structure has a fixed memory size. It is easier to access the elements in a static data structure.
      An example of this data structure is an array.
    • Dynamic data structure : In dynamic data structure, the size is not fixed. It can be randomly updated during the runtime which may be considered efficient concerning the memory (space) complexity of the code.
      Examples of this data structure are queue, stack, etc.
  • Non-linear data structure : Data structures where data elements are not placed sequentially or linearly are called non-linear data structures. In a non-linear data structure, we can’t traverse all the elements in a single run only.
    Examples of non-linear data structures are trees and graphs.