AP Computer Science Principles

Advanced Placement Computer Science Principles exploring computational thinking and programming.

Advanced Topics

Data Structures and Abstraction

Organizing Information

Data structures are special ways to organize and store data in a computer so it can be used efficiently. Common types include lists, arrays, and dictionaries (also called maps).

Why Use Data Structures?

Different problems require different ways of organizing data. For example, a list is great for keeping track of your to-do items, while a dictionary helps you look up information quickly.

The Power of Abstraction

Abstraction lets you use data structures without worrying about the details of how they work. You focus on what you need to do, not how it’s done under the hood.

Real-World Example

Think of a dictionary in a library: you look up a word (key) and find its meaning (value). Computers do the same thing with data structures!

Examples

  • Using a list to keep track of all your homework assignments.

  • Using a dictionary to quickly find a friend's phone number by their name.

In a Nutshell

Data structures help organize information, and abstraction hides unnecessary details so you can solve problems more easily.

Key Terms

Array
A collection of items stored in a specific order.
Dictionary
A collection of key-value pairs for fast lookups.
Abstraction
Hiding unnecessary detail to focus on solving problems.