Project 7 of 9, for Yahya
University and Interview Readiness
Yahya's timed paper of six first-year problems, from the Workshop to the Puzzle Room, then practice at explaining your own work out loud, as a university interview or a job interview would ask.
Act 9 needs a free account, so your work is saved as you go. Act 1 is open to everyone.
The brief
- YahyaIt's six first-year questions in a hundred and fifty minutes, and I did it in ninety-four.
- PaulUniversities ask two things of you, and so do interviews. It happens to be the same two.
- PaulSolving something you've never seen against a clock, and then explaining something you built, clearly.
- CaitlinI'll just do the questions in order, it's the quickest way through.
- YahyaRead them all first, and then we can talk about quickest.
Two parts, and a clock in the top bar that counts your time against 150 minutes. Nothing happens when it runs out.
The paper. Six questions from the Workshop to the Puzzle Room, at the level of a first-year exam. Each is one function in its own file, checked by hidden tests: empty input, one item, duplicates, and inputs big enough that a slow answer runs out of time.
first_error(text): the first bracket that doesn't match.winner(ballots): the winning print in an exhibition's vote, with a fair tie-break.round_order(parcels): a courier's round, sorted three ways at once.count_pairs(prices, target): a slow function, made fast.bank_sizes(chart): the sandbanks on a chart of the estuary.smallest_limit(crates, days): the lightest load limit that gets a ferry's crates across in time.
The interview. Three questions about work you've shipped, each with Paul's own answer to set beside yours. Then a practice interview, out loud, against Paul's list.
>>> first_error("[lamp(on]")
8
>>> winner(["Gull", "Tern", "Gull"])
'Gull'
>>> smallest_limit([4, 8, 3, 5, 6], 3)
11What you learn
What's in it
- Before the clock
- Binary search on the answer
- Question 1: The clock's lamp schedule
- Question 2: The poster vote
- Question 3: The courier's round
- Question 4: Two for a pound
- Question 5: Sandbanks at low water
- Question 6: The ferry's load limit
- Interview: a decision
- Interview: ten times as many
- Interview: a bug you found
- Practice interview
- Ship it