What is computer science?
Computer science is the study of computation itself: how to solve problems using precise, step-by-step procedures called algorithms, and how to organize information so those procedures can work with it efficiently.
Algorithms: precise step-by-step procedures
An algorithm is a finite, exact sequence of steps that solves a problem. Consider searching for a name in an unsorted list of 100 names: a linear search checks each entry one at a time, from the start, until it finds a match or reaches the end. In the worst case — the name is last, or not present at all — this takes 100 checks.
Binary search: a real proof that sorted data can be searched much faster
If the list is sorted alphabetically, a much faster method exists: binary search. Check the middle entry. If it matches, you're done. If the target comes before it alphabetically, repeat the same process on just the first half of the list; if it comes after, repeat on just the second half. Either way, you've eliminated half the remaining list with a single check.
Here's why this is genuinely faster, not just usually faster: starting with 100 entries, one check leaves at most 50 candidates; a second check leaves at most 25; a third leaves at most 13; and so on, roughly halving every time. Since halving a number repeatedly shrinks it to 1 after about log₂(100) ≈ 7 steps, binary search finds any entry in a 100-name sorted list using at most about 7 checks — compared to up to 100 checks for linear search on the same size list. This isn't a coincidence of this particular example: the same halving argument works for a list of any size, which is why binary search's advantage grows dramatically larger as the list gets bigger.
Data structures: how information gets organized
An array stores items in a fixed sequence of slots, with each item reachable directly by its position — fast to access, but inserting a new item in the middle requires shifting every item after it. A linked list instead stores each item along with a pointer to the next one; inserting a new item just requires updating two pointers, no shifting required — but reaching the 50th item means following 49 pointers one at a time, since there's no direct way to jump straight to a position. Neither structure is simply "better" — each trades off differently, which is why computer science studies several different structures rather than settling on just one.
Why computer science matters
Every piece of software — from a simple calculator to a search engine indexing billions of pages — depends on choosing the right algorithm and data structure for the job. The difference between an efficient approach and an inefficient one, as the binary search example shows, can mean the difference between a program that responds instantly and one that would take longer than a human lifetime to finish on a large enough input.