code programming

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 leçons
  • publicEnglish
  • workspace_premiumBasic
Algorithms That Finish In Time

Briefing

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.

Plan du cours · 4 modules

lockSe déverrouille avec l'accès
  1. 01 Why a Correct Answer Fails
    3 leçons·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…

  2. 02 Sorting and Searching as Tools
    3 leçons·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.

  3. 03 The Running Total, Two Fingers, and Defensible Greed
    3 leçons·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…

  4. 04 Four Problems, Each Solved Twice
    3 leçons·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…

Questions fréquentes

Qu'apprendrai-je dans 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
Ai-je besoin d'une expérience préalable ?
Quelques connaissances préalables sont recommandées avant de commencer Algorithms That Finish In Time.
Combien de temps dure Algorithms That Finish In Time ?
Algorithms That Finish In Time comprend 4 modules et 12 leçons. Vous apprenez à votre propre rythme.
Comment obtenir l'accès ?
Algorithms That Finish In Time est inclus dans tout abonnement payant.

Plus dans Programmation

Binary, Hex and Data Units
Beginner Binary, Hex and Data Units The topic that costs more marks than any other on the paper, taught by hand. Bits and bytes, binary and hex in all six directions, the 1000-versus-1024 trap, file sizes, transmission times, overflow, two's complement and character sets. Every module ends in a timed drill marked the way an examiner marks it.
Python From a White Sheet
Beginner Python From a White Sheet The exact sequence nine students have already walked, from a blank file to a program that asks questions, checks the answers and refuses bad input. No prior programming. No maths. You will break it repeatedly, on purpose.
First Program — Scratch for ages 5–9
Beginner First Program — Scratch for ages 5–9 Nine Scratch blocks, three sessions of about twenty-five minutes, and one small program a child of five to nine builds themselves. Written for the parent sitting beside them: what to click, what they will get stuck on, what to say when it goes wrong, and when to keep your hands off the mouse.
AI Without the Hype
Beginner AI Without the Hype What the model is actually doing when it answers you, why that produces something that looks like thinking, why it invents citations, and the cost mechanic almost nobody explains: a chat resends the entire conversation on every single turn. You will do the arithmetic yourself.
IGCSE and GCSE Computer Science — Theory That Actually Gets Marked
Intermediate IGCSE and GCSE Computer Science — Theory That Actually Gets Marked The theory half of the paper, taught so it survives the exam room. The memory hierarchy and what actually happens at boot. Compilers, interpreters and assemblers, including the answer that sounds right and scores nothing. Databases from a spreadsheet up to keys and normalisation. DNS and the full path between pressing Enter and seeing the page. Systems software, and the ethical and legal section that is the easiest ten marks on the paper.
Programming for the Exam — Python Answers That Score
Intermediate Programming for the Exam — Python Answers That Score The programming half of the paper, taught at exam pitch. Pseudocode translated both ways, because the mark scheme is written in a notation nobody practises. Trace tables done column by column, including the ones with a loop and a condition inside it. Linear and binary search, bubble and insertion sort, what each costs and the comparison questions boards love. Validation against verification, and the boundary test data everybody forgets. Procedures against functions, and a systematic method for finding your own error with four minutes left.