Introduction of data structure

8,935 views

Published on

Published in: Education, Technology
1 Comment
10 Likes
Statistics
Notes
No Downloads
Views
Total views
8,935
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
494
Comments
1
Likes
10
Embeds 0
No embeds

No notes for slide

Introduction of data structure

  1. 1. Introduction to Data Structure www.eshikshak.co.in
  2. 2. Algorithm <ul><li>An algorithm is a finite set of instructions which, when followed, accomplishes a particular task. </li></ul><ul><ul><li>Its Characteristics </li></ul></ul><ul><ul><ul><li>Each instruction should be unique and concise </li></ul></ul></ul><ul><ul><ul><li>Each instruction should be relative in nature and should not be repeated infinitely. </li></ul></ul></ul><ul><ul><ul><li>Repetition of same task(s) should be avoided. </li></ul></ul></ul><ul><ul><ul><li>The result be available to the user after the algorithm terminates. </li></ul></ul></ul>www.eshikshak.co.in
  3. 3. Efficiency of Algorithms <ul><li>The performance of algorithms can be measured on the scales </li></ul><ul><ul><li>Time </li></ul></ul><ul><ul><li>Space </li></ul></ul>www.eshikshak.co.in
  4. 4. Space Complexity <ul><li>The amount of memory space required by the algorithm during the course of execution </li></ul><ul><li>Some of the reasons for space complexity are </li></ul><ul><ul><li>If the program, is to run on mutli-user system, it may be required to specify the amount of memory to be allocated to the program </li></ul></ul><ul><ul><li>We may be interested to know in advance that whether sufficient memory is available to run the program. </li></ul></ul><ul><ul><li>There may be several possible solutions with different space requirements . </li></ul></ul>www.eshikshak.co.in
  5. 5. Space needed by Program Components <ul><li>Instruction Space – Space needed to store the executable version of the program and it is fixed. </li></ul><ul><li>Data Space : It is needed to store all constants, varialbe values </li></ul><ul><li>Environment Space : Space needed to store the information needed to resume the suspended functions. </li></ul>www.eshikshak.co.in
  6. 6. Time Complexity <ul><li>The amount of time needed to run to completion. </li></ul><ul><li>Some reasons for studying time complexity </li></ul><ul><ul><li>We may be interested to know in advance that whether a program will provide satisfactory real time response. </li></ul></ul><ul><ul><li>There must be several possible solutions with different time requirements. </li></ul></ul>www.eshikshak.co.in
  7. 7. Data structure <ul><li>When elements of data are organized together in terms of some relationships among the elements, the organization is called data structure. </li></ul><ul><li>A data structure is a set of data values along with the relationship between the data values in form of set of operations permitted on them. </li></ul><ul><li>Arrays, records, stacks, lists, graphs are the names of some of some of these basic data structures. </li></ul>www.eshikshak.co.in
  8. 8. A data structure can be <ul><li>(a) transient </li></ul><ul><li>i.e. it is created when a program starts and is destroyed when the program ends. Most data structures in main memory are transient, for example, an array of data. </li></ul><ul><li>(b) Permanent </li></ul><ul><li>i.e. it already exists when a program starts and is preserved when the program ends. Most data structures on disk are permanent, for example, a file of data, or a cross-linked data file collection (a database). </li></ul>www.eshikshak.co.in
  9. 9. www.eshikshak.co.in Linear Non-Linear <ul><li>Array </li></ul><ul><li>Stack </li></ul><ul><li>Queue </li></ul><ul><li>Linked Lists </li></ul><ul><li>Tree </li></ul><ul><li>Graph </li></ul>Data Structure
  10. 10. Abstract Data Type (ADT) <ul><li>It is a mathematical model with a collections of operations defined on that model. </li></ul><ul><li>The ADT encapsulates a data type can be localized and are not visible to the users of the ADT. </li></ul><ul><li>An implementation of an ADT is a translation into statements of a programming language, of the declaration that defines a variable to be of that ADT, plus a procedure in that language for each operation of the ADT. </li></ul>www.eshikshak.co.in

×