Algorithms That Finish In Time
Your Bronze solution was correct and the judge failed it anyway, because correct was never the whole test. This segment is about the other half of the verdict: counting the work before you write the code, and the four tools — sorting, binary search on the answer, prefix sums and two pointers, and greed you can defend — that turn a right answer that arrives late into a right answer that arrives.
- trending_upAdvanced
- schedule7h 32m
- menu_book12 节课程
- publicEnglish
- workspace_premiumBasic
课程概述
At the end of python-to-cpp you solved one Bronze-shaped problem with two nested loops, and the constraints said that was allowed. This segment starts where that permission runs out. The first thing you do here is write another correct double loop, run it on an input the constraints permit, and watch it take eight seconds against a two-second limit. Nothing in it is wrong. It is late, and late is marked the same as wrong. The rest of the segment is learning to see that verdict coming before you have written a line: read the constraint, count the operations, compare against the clock. Then the tools, one at a time and each one measured. Sorting, which you call rather than write, and what being sorted buys you. Binary search pointed at the answer instead of at an array. The running total that turns a hundred thousand re-additions into one subtraction. Two pointers that cross an array once between them. And greedy choices — the difference between a rule you can defend and a rule that happened to work on the sample, demonstrated by two plausible rules failing in front of you. The last module is four problems at the level, each solved twice: the way you would have solved them a month ago, timed, and then the way that finishes. Every timing in this segment is real. The same programs, the same inputs, the same machine. When a lesson says eight seconds, something ran for eight seconds.
课程大纲 · 4 个模块
lock解锁权限内容- 01 Why a Correct Answer Fails3 节课程·1h 25m
exam-python taught these ideas for a mark scheme: count the comparisons, name the algorithm, earn the marks. Here nobody reads your code. A machine runs it against a limit, and the only questions are…
- 02 Sorting and Searching as Tools3 节课程·1h 55m
E3 owns how sorting algorithms work, for marks. This module never writes a sort. It calls one, measures what it costs, and spends the rest of the time on what becomes cheap once data is in order.
- 03 The Running Total, Two Fingers, and Defensible Greed3 节课程·1h 52m
Three tools that all do the same trick: they refuse to redo work. The running total remembers every sum you have already done. The two fingers never move backwards. The greedy rule commits without…
- 04 Four Problems, Each Solved Twice3 节课程·2h 20m
The ritual is the syllabus now: four boxes, count the operations against the limit, name the tool, then write. Each lab runs the honest bad version first because the bad version is what you will…
常见问题
- 我将在 Algorithms That Finish In Time 中学到什么?
- Your Bronze solution was correct and the judge failed it anyway, because correct was never the whole test. This segment is about the other half of the verdict: counting the work before you write the code, and the four tools — sorting, binary search on the answer, prefix sums and two pointers, and gr
- 我需要有先前的经验吗?
- 建议在开始 Algorithms That Finish In Time 前具有一定的先前知识。
- Algorithms That Finish In Time 需要多长时间?
- Algorithms That Finish In Time 包含 4 个模块和 12 节课程。您可以按自己的速度学习。
- 我如何获得访问权限?
- Algorithms That Finish In Time 包含在任何付费订阅中。