Hints and the Approach tab
Hints are free and ladder one at a time; the Approach tab is the author's walkthrough - and the one place on the page a Big-O is allowed to appear.
Two different kinds of help, and they are meant to be reached in this order: a hint when you are stuck, the approach when you want to see how it is meant to be done.
Hints#
At the foot of the Description tab is a hint ladder. A problem carries up to five.
They open one at a time - the button offers the next unopened one, not all of them at once. That is the whole point of a ladder: you stop at the one that unsticks you rather than reading five and being handed the answer. Nothing enforces it, though. A hint is not a secret.
If you are signed in we record how many you opened, so the count can sit alongside a solve. "You solved this after two hints" is useful self-knowledge; it is not a mark against you and it is not shown to anybody else.
A problem with more than five hints does not exist. Past that it stops being a nudge and becomes a walkthrough, which is the next tab's job.
The Approach tab#
The author's explanation of how the problem is meant to be solved: the intuition, usually a brute force worth understanding before discarding, and the approach they were aiming at.
It carries who last updated it and when. A walkthrough written against a signature that has since changed is worse than no walkthrough, so the date is on screen rather than buried.
The target complexity#
Above the walkthrough - and shown even when no walkthrough has been written - is the complexity the author declared for the problem:
Aim for
O(n)time,O(n)space.
This is the most useful thing on the tab if you are stuck on how to improve a working solution, because it tells you what you should be reaching for before you read a word of anybody's method.
Related#
Was this page helpful?