The document provides an overview of data structures, defining them as specialized formats for organizing and storing data efficiently. It outlines various operations such as traversing, searching, insertion, and deletion, and distinguishes between physical and logical data structures, including linear and non-linear types. Additionally, it discusses real-world applications and computer science uses of data structures, as well as the concept of Abstract Data Types (ADTs).
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
20 views13 pages
DS-Chapter - 1
The document provides an overview of data structures, defining them as specialized formats for organizing and storing data efficiently. It outlines various operations such as traversing, searching, insertion, and deletion, and distinguishes between physical and logical data structures, including linear and non-linear types. Additionally, it discusses real-world applications and computer science uses of data structures, as well as the concept of Abstract Data Types (ADTs).
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13
DATA
STRUCTURE AND Algorithms Data Structure
It is a logical way of storing
data and it also define mechanism of retrieve data. Cont… • It is a specialized format for organizing and storing data. • Data structure is design to organizing data for specific purpose. • It helps the user to store data in such a way that it can be used and process efficiently. Data Structure Operation Traversing: Accessing each record exactly once so that certain item in the record may be processed. Searching: finding the location of the record with a given key value .
Insertion : add a new record to the structure
Deletion : removing a record from the structure
• The process of accessing each element / node atleast once so that certain items in the record may be processed is called traversing. Traversing: Types of Data Structure • Physical Data structure Refers to anything pertaining to hardware. The opposite of physical is logical. For example, physical memory refers to the actual RAM chips installed in a computer. A physical data structure refers to the actual organization of data on a storage device.
• Logical Data structure
The logical data structure refers to how the information appears to a program or user. For example, a data file is a collection of information stored together. This is its logical structure. Physically, however, a file could be stored on a diskin several scattered pieces. Types of Data Structure cont… • Physical Data structure a. Array b. List
• Logical Data Structure
1. Linear list a. Stack b. Queue 2. Non linear list a. Tree b. Graph Types of Data structure • Linear data structure: A type of data structure in which the data elements are stores in linear sequence is known as linear data structure. E.g array, stack, queue and linked list. • Non Linear data structure: A type of data structure in which the data elements are store in non linear sequence is known as non linear data structure. e.g. trees and graphs are examples of non linear data structure. Real world application of data structure • Mobile Phone • List of contacts (Memory) • Call log (list) • Favorites (priority queue) • Travelling the world (graphs) • Maps • Google maps • Shortest path • Alt + Tab (Stack) • Recent App in Mobile (Stack) • Waiting in line in the canteen (Queue) • Departments – program - Courses (Tree) Computer Science Application • Hash Table - used for fast data lookup - symbol table for compilers, database indexing, caches, Unique data representation. • Trie - dictionary, such as one found on a mobile telephone for auto-completion and spell-checking. • Suffix tree - fast full text searches used in most word processors. • Stack - undo\redo operation in word processors, Expression evaluation and syntax parsing, many virtual machines like JVM are stack oriented. • Queues - Transport and operations research where various entities are stored and held to be processed later ie the queue performs the function of a buffer. • Priority queues - process scheduling in the kernel • Trees - Parsers, Filesystem • Radix tree - IP routing table • BSP tree - 3D computer graphics • Graphs - Connections/relations in social networking sites, Routing ,networks of communication, data organization etc. • Heap - Dynamic memory allocation in lisp Abstract Data Types (ADTs) • An abstract data type (ADT) is a set of objects together with a set of operations. Abstract data types are mathematical abstractions; nowhere in an ADT’s definition is there any mention of how the set of operations is implemented. • Objects such as lists, sets, and graphs, along with their operations, can be viewed as ADTs, just as integers, reals, and booleans are data types. • Integers, reals, and Booleans have operations associated with them, and so do ADTs. For the set ADT, we might have such operations as add, remove, size, and contains. • Alternatively, we might only want the two operations union and find, which would define a different ADT on the set. ADTs • Properties of data • Operation on that data ADT