Coder Social home page Coder Social logo

dsa-notes's Introduction

What is DSA?

Data Structure Algorithm is to simply place and store data in an organized manner.
For example: Array
We can store data in Data Array, Stack, Queue are type of data structure where we can store data so that we can use it for particular purpose.

Types of Data Structure

Primitive- int, flow
Non-Primitive- Array, Stack, Queue

Why do you need to learn Data Structure?

• To organize data
• Storage of data
• Retrieval of data
• Manipulation of data

Advantages and Real Use of Data Structure In Domain Name Structure

• DS allow into storage on hard disk
• It manages large data
• It is necessary for designing of efficient algorithm

What is an Algorithm?

Algorithm is a set of instructions which leads to a step procedure for solving a given problem.

What are the properties of Algorithm

  1. Input: Whatever instructions are entered by the programmers.
  2. Output: Atleast one outcome will be produced.
  3. Definiteness: Each instruction should be clear and unambiguous.
  4. Finiteness: Every algorithm with terminate after a certain number of steps and it is called finiteness.
  5. Effectiveness: Every instruction must be sufficiently basic that it can in principle be carried out by a person using pencil and paper.

Efficiency Analysis Of Algorithms

we can compare the performanece of algorithms by using following factors

. space complexity 
. time complexity 

- space complexity
      the term space complexity represents the mount of memory space needed the algorithm in its life cycle
      
- time complexity
      the term time complexity represents of a program is the amount of computer time it needs to run a program to completion
      
      . we can divide the time complexity on three catogories
        1. best case
        2. worst case
        3. average case

Classification of Data Structure

  1. Linear Data Structure
  2. Non-linear Data Structure

1. Linear Data Structure

In the linear data structures data can be processed one by one i.e sequentially

The linear data structures are
- array
- linked list
- stack
- queue

• arrays

  array is a collectiona of homogeneous data elements i.e it can store same type of data value 
  
  advantages :- 
  
  * random access 
  * very fast access if it index known 
  
  dis-advantages :- 
  
  * fixed size
  * store same type of data
  
  types of arrays
  
  - one dimensional array
  - two dimensional array
  - multi dimensional array

  • linked list
  
    linked list is a linear data structure
    the linked list is a linear collections of data items called as nodes
    
    the node is divided into two fields
    
        > data field
        > link field (link to another node)
        
    types of linked list
    
      - single linked list
      - doubly linked list
      - circular linked list

2. Non-linear data strcture

in non-linear data strcture the elements do not form a sequence
we cant access the data on sequentially

the non-linear data structures are :-
- trees
- graphs

  • trees
      tree is a finite set of nodes, that is specially designated node is called root and remaining nodes are collections of sub trees
  
  • graphs
      graphs is a collection of non-empty nonlinear set of nodes and set of edges

Common Operations on Data Strctures :

  • Insertion : adding the new elements to existing data strcture
  • Deletion : deleting the element from a data structure
  • Traversing : access the each elements
  • Searching : searching a particular element on a particuar data structure
  • Sorting : arramging the elements either ascending or descending order
  • Merging : combine two different program element into single sorted file

How you can learn Data Structure and Algorithms ?

Learn DSA from Books

  • Learning from books is always a good practice. You will get the big picture of programming concepts in the book which you may not find elsewhere.
  1. Introduction to Algorithms, Thomas H. Cormen - it is one of the best books in algorithms and covers a broad range of algorithms in-depth
  2. Algorithms, Robert Sedgewick - it is the leading textbook on algorithms and is widely used in colleges and universities
  3. The Art of Computer Programming, Donald E. Knuth - this book is considered best if you know the subject and are looking for deeper understanding

Learn DSA through visualization

  • Once you have some idea about data structure and algorithms, there is a great resource at Data Structure Visualizations that lets you learn through animation.

dsa-notes's People

Contributors

affanrahman0 avatar deblina28 avatar developpermanoj avatar krushna-prasad-sahoo avatar muskankhoiya avatar prasun420 avatar srasthychaudhary avatar subilink avatar testkiran avatar yakshumakkar39 avatar yatharthnigam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.