Home > Courses > Data Structures (CSC 301) > Introduction to Data Structure

Introduction to Data Structure

Subject: Data Structures (CSC 301)

What is Data?


In computer science, Data refers to the raw facts, values, or symbols that computers store and process.

- The Raw Material: Data is the information itself; the numbers, text, images, or sounds that your program needs to work with.
- Examples: The number 25 (an integer), the name "Onuorah" (a string), or the truth value "True" (a boolean).
- The Single Unit: The smallest, individual piece of information is often called a "data element" or a "datum" (the singular of data).
- The Primitive Type: Data is defined by its "data type", which tells the computer how to interpret the binary values (0s and 1s) and what operations can be performed on them (e.g., you can add two integers, but not two strings).

How Data Structures Organize Data


A data structure is the "system" you use to store a "collection" of these individual data elements.

A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. Essentially, it determines the relationship between the data elements and helps programmers manage data effectively.





Why Study Data Structures?


1. Efficiency: They enable you to write programs that run faster and use less memory (think about searching for a name in a phone book vs. searching for it randomly).
2. Scalability: Well chosen data structures are crucial for building applications that can handle a massive amount of data.
3. Abstraction: They provide a high-level model for organizing data, allowing you to focus on the logic rather than the low-level memory details.


Practical Example


Lists (Dynamic Arrays)
• Ordered, mutable collection.
• Efficient for indexing, but slower for insertions/deletions in the middle.

#Python Example: Searching for a name in a list
names = ["Ade", "Chioma", "Femi", "Abu"]

# Linear search (O(n))
target = "Abu"
for name in names:
    if name == target:
        print("Found:", name)


By: Vision University

Comments

No Comment yet!

Login to comment or ask question on this topic




  • 1 Introduction to Data Structure