What are DS ?

Data Structures are different ways of organizing the data on a computer.

Why we need DS ?

This is necessary for an efficient processing of the software. The efficiency of a program depends on how its data is stored, linked and grouped, i.e., how its organizing.

Knowing what are different DS and when to utilize which DS very much decides the efficiency of a program.

  • Imagine going to a library and finding a book, if all books are just thrown randomly it might takes ages to find the right one, which is why organizing the data matters for efficient functioning

How to decide on DS algo to choose?

  • Type/Types of the data available

Types

  • Primitive

    • Integer
    • Float
    • Character
    • String
    • Boolean
  • Non-Primitive

    • Linear DS

      • Static DS
        • Array
      • Dynamic DS
        • Linked List
        • Stack
        • Queue
    • Non-Linear DS

      • Tree
      • Graph