1 / 13

Data Structure

Data Structure. Topics to be discussed…. DATA STRUCTURE DATA STRUCTURE OPERATIONS BIG-O NOTATION TYPES OF DATA STRUCTURE ARRAY SPARSE MATRICES. DATA STRUCTURE. The logical and mathematical model of a particular organization of data is called data structure.

cheng
Download Presentation

Data Structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Structure

  2. Topics to be discussed…. DATA STRUCTURE DATA STRUCTURE OPERATIONS BIG-O NOTATION TYPES OF DATA STRUCTURE ARRAY SPARSE MATRICES

  3. DATA STRUCTURE The logical and mathematical model of a particular organization of data is called data structure. Interrelationship among data elements that determine how data is recorded, manipulated, stored, and presented by a database. Data structure must be rich enough to mirror the actual relationships of data in real world. Data structure should be simple enough that one can effectively process the data when necessary. back

  4. DATA STRUCTURE OPERATIONS Traversing: accessing each record exactly once so that certain items in the record may be processed. Searching: Finding the location of the record with a given key value. Inserting: Adding a new record to the structure. Deleting: Removing a record from the structure.

  5. ALGORITHMS: COMPLEXITY, TIME-SPACE TRADEOFF An algorithm is a well defined steps for solving a particular problem. The complexity of an algorithm is the function which gives the running time and space in terms of the input size. Time –space tradeoff- by increasing the amount of space for storing data, one may be able to reduce the time needed for processing the data and vice versa back

  6. BIG-O NOTATION • A theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items. Informally, saying some equation f(n) = O(g(n)) means it is less than some constant multiple of g(n). The notation is read, "f of n is big oh of g of n". • Formal Definition: f(n) = O(g(n)) means there are positive constants c and k, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ k. The values of c and k must be fixed for the function f and must not depend on n. back

  7. TYPES OF DATA STRUCTURE LINEAR NON LINEAR Array Tree stack graph Queue Linked list

  8. Primitive data structure:. the data structure available to compiler is called primitive data structureNon primitive data structure: the data structure which is not available to compiler is called non primitive data structure. back

  9. ARRAY An array is collection of homogeneous type of data elements. An array is consisting of collection of elements. An array can be represented as shown by diagram in memory

  10. OPERATIONS ON ARRAY Traversing: accessing each element in an array Search: to find an element from an array Inserting: to insert an element in to an array Deleting: to delete an element in to an array Sorting: to arrange elements of an array in to an order Merging: to merge to array

  11. TYPES OF ARRAY One Dimensional Array: int A[10]; Two dimensional Array: int a[10][25]; back

  12. SPARSE MATRICES • An example sparse matrix: • A lot of “zero” entries. • Thus large memory space is wasted. 15 0 0 22 0 -15 0 11 3 0 0 0 0 0 0 -6 0 0 0 0 0 0 0 0 91 0 0 0 0 0 0 0 28 0 0 0 A = back

  13. Thank You

More Related