Focusing only on the essential information needed to solve a problem while ignoring irrelevant details. Abstraction reduces complexity by creating simplified models that capture what matters and hide what does not, enabling reasoning at higher levels.
Zooming out to see the big picture, hiding complexity you don't need right now.
Showing a random 20 of 76 problems.
Example 1
medium
A model of a coin flip ignores air, spin, and force, keeping only 'heads or tails with p=0.5'. Why is dropping the physics a GOOD abstraction here?
Example 2
easy
A weather app reports just 'rain expected' instead of full atmospheric data. This simplified report is a model created by what?
Example 3
challenge
Lambda calculus has only variables, function abstraction, and application. Argue why this minimal system is Turing-complete despite hiding so much.
Example 4
easy
To use a 'sort' function you only need its name and inputs, not its internal code. What concept lets you ignore the internals?
Example 5
easy
For 'find the fastest route', which detail is ESSENTIAL: (a) road travel times, (b) the color of the cars?
Example 6
medium
A `RandomNumber` interface lets a test inject a deterministic stub. What design technique is this, and what abstraction is exposed?
Example 7
hard
Why is `O(1)` for hash-table lookup an idealized abstraction rather than literally true?
Example 8
medium
A `Sortable` interface declares `compareTo(other)`. Which design pattern does this enable across `Integer`, `String`, `Date`?
Example 9
medium
Joel Spolsky's 'Law of Leaky Abstractions': give one concrete example where a network library's abstract `send()` leaks the underlying network.
Example 10
easy
A weather app shows temperature, rain chance, and wind speed, but hides sensor voltages and calibration values. What information is abstracted away, and why is that useful?
Example 11
easy
Levels of abstraction: high-level language -> assembly -> machine code. Which is the HIGHEST level (most detail hidden)?
Example 12
medium
A model represents a person as just `{age}`. A new feature needs to send email reminders. What is the abstraction error?
Example 13
medium
A simulation models a planet as a point with mass and position, ignoring its shape and rotation. For computing the planet's orbit around a star, is this a GOOD abstraction?
Example 14
medium
An 'Animal' type defines makeSound(). Dog and Cat implement it differently. The shared makeSound() interface is an abstraction over what?Animal interface with Dog and Cat as concrete implementations
Example 15
medium
A 'User' model for a login system keeps {username, passwordHash}. Should it also store the user's favorite color for login? Answer and justify.
Example 16
easy
A file's contents are read with `open(path)` regardless of whether the file is on disk, in RAM, or on a network drive. What kind of abstraction enables this?
Example 17
easy
A subway map shows lines and stops but not exact distances or streets. Hiding irrelevant detail to show only what matters is called what?
Example 18
medium
An `Iterator` exposes `hasNext()` and `next()`. What does this abstract over, exactly?
Example 19
challenge
Designing a 'Shape' abstraction with area(), you must decide what each shape stores. Why is exposing only area() (not the formula) the right boundary?
Example 20
easy
A high-level language like Python lets you write `x + y` without writing the CPU's add instruction. What is the abstraction level above the CPU called?