Algorithms

Boolean

A piece of data that can only be true or false. It needs 1 bit, but almost always takes 1 byte.

Example

"Is the user online?" is a boolean. 1,000 loose booleans take about 1,000 bytes.

Test yourself: Boolean

Basic data types

How much memory does a boolean almost always take?

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.