Presentation is loading. Please wait.

Presentation is loading. Please wait.

C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.

Similar presentations


Presentation on theme: "C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure."— Presentation transcript:

1 C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure

2 Unit-2 Overview of Data Structure Developed By Nitendra Overview of Data Structure A data structure is the organization of data in a computer's memory or in a file. The proper choice of a data structure can lead to more efficient programs. At the lowest level, there are data structures supplied and supported by the CPU (or computer chip), itself. At the second level of the data structures spectrum are the data structures supported by particular programming languages. These vary a lot from language to language. The size of the computer memory size sometimes very small with respect to the file size. That time the file splits into number of fragments and swap into the memory. NextHome

3 Unit-2 Overview of Data Structure Developed By Nitendra A data structure is a representation of data and the operations allowed on that data. A specification, an application and an implementation view of a collection of one or more items of data, and the operations necessary and sufficient to interact with the collection. The specification is the definition of the data structure as an abstract data type. The specification forms the programming interface for the data structure. The application level is a way of modeling real-life data in a specific context. It is happening specially for the memory management. Definition NextHome

4 Unit-2 Overview of Data Structure Developed By Nitendra Some example data structures are: array, stack, queue, linked list, binary tree, hash table, heap, and graph. Data structures are often used to build databases. Typically, data structures are manipulated using various algorithms. Example of Data Structure NextHome

5 Unit-2 Overview of Data Structure Developed By Nitendra When primitive data types are not sufficient to handle the data then we have to define some data type along with its activities, storage structures, algorithms. The ADT is the data type which has the following components 1) Operations: Specifications of external appearance of a data structure 2) Storage Structures: Organizations of data implemented in lower- level data structures 3) Algorithms: Description on how to manipulate information in the storage structures to obtain the results defined for the operations Abstract Data Types (ADT) NextHome

6 Unit-2 Overview of Data Structure Developed By Nitendra The abstract (or logical) level is the specification of the data structure -the "what" but not the "how." At this level. the user or data structure designer is free to think outside the bounds of anyone programming language. For instance. a linear list type would consist of a collection of list nodes such that they formed a sequence. The operations defined for this list might be insert. delete, sort and retrieve. The Abstract Level NextHome

7 Unit-2 Overview of Data Structure Developed By Nitendra At the application or user level, the user is modeling real-life data in a specific context. In our list example. we might specify what kind of items were stored in the list and how long the list is. The context will determine the definitions of the operations. For example, if the list was a list of character data, the operations would have a different meaning than if we were talking about a grocery list. The Application Level NextHome

8 Unit-2 Overview of Data Structure Developed By Nitendra The implementation level is where the model becomes compileable, executable code. We need to determine where the data will reside and allocate space in that storage area. We also need to create the sequence of instructions that will cause the operations to perform as specified. The Implementation Level NextHome

9 Unit-2 Overview of Data Structure Developed By Nitendra NextHome

10 Unit-2 Overview of Data Structure Developed By Nitendra There are two types of Data Structures 1.Linear Data Structure A data structure is said to be linear if its elements form a sequence or a linear list. Examples: Arrays Linked Lists Stacks, Queues NextHome

11 Unit-2 Overview of Data Structure Developed By Nitendra Pictorial Representation of Array a[0]a[1]a[2]a[3]a[4] a[0][0]a[0][1]a[0][2]a[0][3]a[0][4] a[1][0]a[1][1]a[1][2]a[1][3]a[1][4] a[2][0]a[2][1]a[2][2]a[2][3]a[2][4] One Dimension Two Dimension NextHome

12 Unit-2 Overview of Data Structure Developed By Nitendra Pictorial Representation of Linked Lists Linked List: 63001009400122005700-10NULL Tail Node 100300 400200 700 Address Part Data Part Arbitrary Address of the Node Head Node NextHome

13 Unit-2 Overview of Data Structure Developed By Nitendra Pictorial Representation of Stack NextHome

14 Unit-2 Overview of Data Structure Developed By Nitendra Pictorial Representation of Queue NextHome

15 Unit-2 Overview of Data Structure Developed By Nitendra Traversal: Travel through the data structure Search: Traversal through the data structure for a given element Insertion: Adding new elements to the data structure Deletion: Removing an element from the data structure Sorting: Arranging the elements in some type of order Merging: Combining two similar data structures into one Operations on Linear Structures NextHome

16 Unit-2 Overview of Data Structure Developed By Nitendra 2. Non Linear Data Structure A data structure is said to be non linear if its elements cannot form a sequence or a linear list. Examples: Trees Tree terminology Binary Search Trees Tree Traversal NextHome

17 Unit-2 Overview of Data Structure Developed By Nitendra


Download ppt "C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure."

Similar presentations


Ads by Google