💻

Introduction to Data Structures

Jun 19, 2024

Introduction to Data Structures

What is Data?

  • Dictionary Definition: Quantities, characters, or symbols on which operations are performed by a computer, stored, and transmitted as electrical signals, and recorded on media.
  • Example: Performing operations on quantities (e.g., arithmetic operations on numbers).

Data vs. Information

  • Data: Collection of characters or symbols without inherent meaning.
    • Example: Random string of characters.
  • Information: Processed data arranged in a structured way to convey meaning.
    • Example: Reversing a string to reveal "My name is Jaspreet."
  • Key Point: Data needs to be managed and structured to become meaningful information.

What is a Data Structure?

  • Definition: Systematic way to organize data for efficient use.
    • Efficiency: In terms of time and space.
  • Example: Arrays
    • Sequence or collection of symbols, characters, integers, floats.
    • Useful for storing multiple values of the same type (e.g., 100 integers in an array vs. 100 separate variables).
    • Managing strings as arrays of characters.

Real-Life Examples of Data Structures

  1. Stack in Undo/Redo Functionality

    • Application: Used in Google Docs, PowerPoint, Microsoft Word.
    • Mechanism: Actions are stored in a stack.
      • Undo (Ctrl+Z): Pops the last action and pushes it to a redo stack.
      • Redo (Ctrl+Y): Pops the last undo operation from the redo stack back to the undo stack.
  2. Array in Bitmap Images

    • Bitmap Images: Stored as series of pixels.
    • 2D Array: Each pixel's color information is stored in a 2-dimensional array (e.g., 37x40 array to store an image of Pikachu).
  3. Graph in Social Networking

    • Example: Storing friendship information on Facebook.
    • Graph Structure: Nodes represent people; edges represent friendships.
    • Connections: Maintains who is friends with whom (e.g., James with Mark and Lia, Lucy with Mark and Lia).

Importance of Data Structures

  • Significance in IT: Crucial for efficiently managing and retrieving data.
  • Industry Relevance: Highly valued skill due to practical applications in software development.

Thank you for following the presentation!