Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Successfully reported this slideshow.

Like this presentation? Why not share!

- Type research by Kanpur Institute ... 33015 views
- Major Types of Research by Tabi Khan 2628 views
- Introduction to data structures and... by Dhaval Kaneria 16837 views
- Types of research by Ashish Sahu 44997 views
- Presentation on types of research by Kanpur Institute ... 59980 views
- Types of Research Designs RS Mehta by Ram Sharan Mehta,... 139383 views

1,588 views

Published on

-Basics of Data Structure and Algorithm

-Practical Examples of where Data Structure Algorithms is used

-Asymptotic Notations [ O(n), o(n), θ(n), Ω(n), ω(n) ]

-Calculation of Time and Space Complexity

-GNU gprof basic

No Downloads

Total views

1,588

On SlideShare

0

From Embeds

0

Number of Embeds

7

Shares

0

Downloads

119

Comments

0

Likes

3

No embeds

No notes for slide

- 1. Introduction to Data Structure and Algorithm Presented By: Pratik Mota
- 2. Objectives Basics of Data Structure and Algorithm Practical Examples of where Data Structure Algorithms is used Asymptotic Notations [ O(n), o(n), θ(n), Ω(n), ω(n) ] Time and Space Complexity GNU gprof basic
- 3. Basics of Data structure and Algorithm Data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. Some Well-know Data structure 1) Array 2) List [Singly and Doubly Linked List] 3) Tree [ Binary,AVL, Red Black..etc ] 4) B+ Tree 5) Heap [ Max and Min Heap ] 6) Hashing 7) Graph [ BFS, DFS,..etc ]
- 4. Basics of Data structure and Algorithm Algorithm is a step-by-step procedure for calculations OR you can tell it is sequence of program instructions designed to compute a particular result. Examples:- Sorting, Searching, Shortest Path, Dynamic Programming, Numerical Algorithms etc.. Sort INPUT sequence of numbers a1, a2, a3,….,an b1,b2,b3,….,bn OUTPUT a permutation of the sequence of numbers 2 5 4 10 7 2 4 5 7 10 Sorting Algorithm
- 5. Use of Data Structure and Algorithm
- 6. Practical Examples (Cont.)
- 7. Practical Examples (Cont.)
- 8. Asymptotic Notations 1n 2n 3n 4n 5n 6n Runningtime 1 2 3 4 5 6 7 8 9 10 11 12 ….. best-case Ω(n) average-case θ(n) worst-case O(n) Input instance size o(n) ω(n)
- 9. Basics of Complexity O(1) < O(log n ) < O(n) < O(n log n ) < O(n^2) < ….. < O(n^k) < O(2^n) O( n^2 + n + 1 ) => O(n^2) MAX ( f(n), g(n) ) O(N + a)^b O(N^b) Time Complexity :- Amount of time taken by an algorithm to run. Space Complexity:- Extra/Temporary Space use by algorithm .
- 10. Time and Space Complexity O(n) O(n^2) O( log n )
- 11. GNU gprof Gprof is a profiling program which collects performance statistics of our programs. For Performance analysis -pg option needed for GCC / g++ Compiler. Ex:- g++ -pg gprof_test.cpp -o gprof_test After running ./gprof_test , It generates gmon.out file. gmon.out file contain Performance analysis statistics, which can be analyze using gprof tool. Ex:- gprof gprof_test gmon.out > analysis.txt It provides mainly two type of Performance Analysis 1) Flat Profile [ Total amount of time your program spent executing each function ] 2) Call graph [ How much time was spent in each function and its children ]

No public clipboards found for this slide

Be the first to comment