Problems in disguise
- changelog
Problems in disguise
Most practice sites let you recognize a problem from its title before you've read a word of it. Real interviews rarely work that way: the question arrives as a story, and the first job is working out what it actually asks.
So we've written themed versions of the problems in our catalog, over 500 of them. Each one is the same problem underneath, with the same constraints and the same hidden tests, retold as a story with its own title, its own function and parameter names, and its own examples. A pair-sum problem might be about two crates that fill a cargo hold exactly. A window problem might be a gatekeeper deciding who gets bread.
Where you'll meet them
- The Daily Challenge, Trail Blaze and study groups now sometimes serve a themed version in place of the problem they picked. Practice and the Learn ladders never do.
- Nothing tells you a problem is a theme or which problem it's based on. A themed problem never carries the Core label.
- A host's hand-picked problems in a study group stay exactly as picked.
Written to be read
The stories are told in plain English, so the puzzle is working out what's being asked, not decoding the prose. Where a story uses a word you might not know, such as "doubloons", the word has a dotted underline. Hover over it, tab to it or tap it and a short definition opens.
Solving one
- The reveal. When you solve a theme, the result tells you what it was: "Unlocked: Treasure Pair, a disguise of Two Sum". That's the only place the original is named.
- Full XP. The first solve of each theme pays the full XP for its tier, whether or not you've solved the original.
- Your streak counts it, and so does your activity heatmap. A theme doesn't count toward your solved totals, ladders or leaderboard solve counts, and solving one doesn't mark the original as solved.
- Locked until found. A theme's page opens only once you've unlocked it, or on the day it is today's daily. Looking back over the daily calendar, you'll see the theme if you solved it and the original problem if you didn't.
Your Collection
The new Collection page, under the Challenges menu, lists every theme you've discovered against the total ("4 / 533 discovered"). Each entry links back to the problem so you can replay it. Themes you haven't found stay hidden, so the page never gives away what's still out there.
For community authors
Class problems
You can now write design problems, the kind where you implement a class with a constructor and a few methods. On the Signature step, choose a class instead of a function, then declare the constructor and each method. Starter code for all eight languages is generated from that, and each test case is edited as a sequence of calls. BlazerBot's tools, the duplicate check and Generate from an idea all handle both kinds.
Class problems have no generated maximum-size case, so the editor tells you their limit: about 6,000 calls per test case.
Every problem and edit is reviewed
Until now, an author whose first problem was accepted could publish later ones on their own. From today, every new problem goes to the team for review, and so does every change to a live problem. Publish changes is now Submit changes for review. While an edit is waiting, the problem's editor is locked, and you can withdraw the edit to keep working. You still control visibility, credit and release timing yourself.
More control over your problems
- Contribute anonymously. A new option in Release settings, which you can change after publishing. An anonymous problem shows "Anonymous" with no profile link, stays off your profile, and doesn't notify your followers.
- Unpublish. A live problem has an Unpublish button that makes it private. Publish again brings it back. Neither needs a review.
- BlazerBot on live problems. Generate inputs, Find mistakes and Strengthen tests now work on a problem that's already live. Anything you accept goes to review like any other edit.
- LaTeX hint. The statement boxes now say they support LaTeX, with inline, block and literal-dollar syntax.
- The slug of a live problem on the Contribute page is now a link to the problem.
Community and study groups
- The Community filter. The All Problems toolbar has a Community pill that shows or hides community-written problems. They're shown by default, and Clear filters brings them back. The Community badge is now orange.
- Leaderboard moved. It now sits in the Community menu, next to Community problems and Streamers.
- Results that stay. A finished study group's results page used to disappear once the room closed, leaving "This study group has ended". It now loads from saved results, ordered by score then finish time, as the live room was. Past study groups link to their final leaderboard.
- Podium ribbons match what you saw. Ribbons were awarded by problems solved, while the room's leaderboard ranked by score. One gold solve could win the room on screen while someone with two bronze solves got the first-place ribbon. Ribbons now follow the standings shown in the room, and players who leave from the lobby no longer count toward the two-player minimum.
- Fresh counts. Solver and vote counts on the Community page and the profile Problems card could be up to five minutes old, and pressing Back after voting showed the old number. Both are now current on every visit.
Smaller changes
- Spectating. With "Allow spectating" on, you could still show as spectating-disabled to everyone else after a reconnect, and refreshing didn't help. The setting now survives reconnects and stays in sync across tabs.
- No more endless "Connecting...". A spectate tab could wait forever when the server turned down its watch request without saying so. Every refused request now gets an answer.
- BlazerBot's pinned test cases. BlazerBot can't run code, so an Expected output it wrote for a custom test case could be wrong and make a correct solution look like it failed. Cases it pins now have no Expected output and show what your code returned.
- Backticks. A backtick in plain text was drawn on top of the letter after it. It now has its own space, and backticked text in sample explanations shows as inline code.
- Technique labels on more solutions. A solution whose approach falls outside the problem's own tags now gets a label at the same confidence as the rest, so fewer shared solutions come back unlabeled.
- Code text renders as typed. The code font's ligatures were changing what they drew: the middle star of
***was raised and||merged into one bar. Code, examples and inputs now show every character as written. - Activity feed layout. Medals and rank names sit on the same line as the sentence they belong to. Time, difficulty and "view solution" have their own row, and difficulty chips are centered.
- Chat. The @handle now sits on its own line under the display name.
- Clearer statements. A review of every problem's tests against its stated limits found statements that left out rules the tests enforce, such as an ordering guarantee or a value range. Those statements now state them, and a few tests that went past their statement's limits were brought back inside.