Sortable solution feeds, prints on re-checks, and a difficulty pass over the imported catalog
- changelog
Solutions feed: sort and page
The Activity tab on a problem page loaded every shared solution in one request behind a fixed cap of 30 rows. Once a problem had 30 shared solutions, every new accepted submission pushed the oldest one out of the tab, and the "All" and "Solutions" counts stuck at 30. There was also no way to order the list.
The feed is now served in pages of 30 with the order decided by the database. A Sort control beside the filter badges offers Newest, Oldest, Most fires and Fastest; the last two apply to the Solutions filter only, since posts have no runtime. The filter badges show the real total, and a Show older button (Show newer under Oldest, Show more under the count sorts) appends the next page. Visibility is unchanged: you see exactly the solutions you could see before, including the share opt-out and private submissions.
Re-check returns your prints
A failing hidden case can be too large to travel as a custom case, so the results panel lets you pin it as a re-check by id: every Run then re-executes the stored case. Until now that reported pass/fail and nothing else, so the one case you most needed to debug was the one you could not print from. Submit had already shown you that case's input, so hiding your prints on it protected nothing.
A re-check of a case that Submit has revealed to you now carries your console output. Input, expected and your return value stay suppressed. Because the return value is withheld, the Output block on those rows always read "(no output)", which made it look as if your function had returned nothing; that block is gone from re-check rows. The reveal is proven server-side from your own stored submissions, so a compile-error response, which lists every hidden id, cannot be turned into a print channel.
All Subsets accepts any order
The statement fixed a binary-counter order over the sorted input. Exactly one unusual recursion emits that order for free (largest index first, exclude before include, path reversed at the leaf); every textbook backtracking got Wrong Answer, and the ordering rule was harder than the lesson's subject.
Every hidden case now compares the rows as a set. The only fixed order is within a subset, where elements keep their order from nums, which is exactly what deciding the indices left to right produces. A third sample, [3,1], shows the within-subset rule, and the lesson drops the "order is binary counting" requirement. All Orderings keeps its lexicographic rule on purpose: its sorted recursion emits it for free and later rungs build on that.
Under the hood, the harness's unordered compare mode now covers 2-D returns in every language (rows sort lexicographically with a proper prefix first), so a future problem that accepts its rows in any order no longer has to invent a canonical one.
Difficulty pass over the imported catalog
Sixty problems imported from the binarysearch corpus had been seeded at the bronze default and never tiered, even though only two of them were "Easy" at the source. They were calibrated against the existing silver rung (Edit Distance, Knapsack, Longest Common Subsequence, All Subsets) and gold rung (Largest Rectangle Area, Smallest Covering Window) rather than by mapping the source labels.
Bronze to gold (4): Fewest Palindromic Pieces, Longest Valid Parentheses Substring, Maximum Profit With K Transactions, Pattern Matching With Dot and Star.
Bronze to silver (30): Apply Range Increments, Arrange Cards for Ascending Reveal, Build Tree From Preorder and Inorder, Count Dice Rolls With Total, Count Islands, Count Mutation Groups, Count Triples With Sum Below Target, Distance to Nearest Zero, Kth Lexicographic Permutation, Largest Number From Concatenation, Longest Common Substring Length, Longest Palindromic Subsequence Length, Longest Substring With Even Vowel Counts, Lowest Common Ancestor in a Binary Tree, Maximum Profit With Two Transactions, Maximum Non-Adjacent Sum in a Circle, Maximum Profit With Cooldown, Maximum Rod Cutting Value, Minimum Cost to Paint a Row, Minimum Deletions to Equalize Strings, Minimum Pay for Ratings, Minimum Pins to Hold All Intervals, Next Digit Permutation, Palindrome With Equivalent Letters, Repair Two Swapped BST Values, Shortest Common Supersequence Length, Shortest Removal for Divisible Sum, Small Large Medium Triple, Three Elements Sum to Target, Valid IP Address Splits, Validate Binary Search Tree.
Minimum Cost to Paint a Row was reported from its problem page ("This should not be a Bronze problem"), and the report was right: the largest hidden case is 500 by 300, so the textbook row DP times out in Python and the accepted approach needs the best/second-best carry. The remaining 25 imports stay bronze; Maximum Sorted Neighbor Gap stays there on purpose, because at its bound a plain sort passes.
Hidden tests
- Palindromic Concatenation Pairs accepted a pair-by-pair check in C++, because every max-size case used 1 to 8 character words and the scan of
words[i] + words[j]exited on the first character. A new case of 5000 words of 300 characters, shaped so every pair matches about 140 characters before disagreeing, runs the brute force past the limit while the reference stays well under it in every language. - Assign Intervals to Groups accepted a per-group scan for the smallest free group, because every max-size case had a tiny group count. New max-size shapes with a group count or free pool that is a large fraction of n time out three different quadratic approaches.
- Fewest Powers of Two Summing to Target listed every hand case largest-first, so a greedy that walks the input without sorting first failed at case 19, a 100,000-element array. Three small cases with small elements before big ones fail it at case 10, where the fault is readable.
- Single Number had one zero case, with the single at index 0. Solutions that seed their accumulator with the first element or treat 0 as unset passed by luck. New hand and max-size cases put 0 as the single in the middle and at the end, and as a pair value with a nonzero single.
Fixes
- Silent one-way desync in collab and mock interviews. Supabase refreshes the session token hourly, and again when a hidden tab whose token went stale becomes visible. The collab session replaced its socket on that event without treating the swap as a disconnect, so the document was never re-opened on the new connection: your edits still went out, but nobody else's came in, and only a page refresh fixed it. Seen in a real 45-minute mock interview. The swap now counts as a disconnect and reconnect; the document re-opens with its state vector, so only the gap travels and nothing typed is lost.
- Goroutine-heavy Go solutions crashed. The sandbox allows 60 processes and threads per submission, and Go sized its scheduler to the host's cores. A goroutine-per-node solution to Maximum Non-Adjacent Tree Sum flooded the run queue and died with
runtime: failed to create new OS thread (have 60 already). The Go harness now pinsGOMAXPROCS(2)ahead of your code, which bounds threads to single digits regardless of goroutine count; the same solution passes all 44 cases. - Truncated inputs in submission history. Stored per-case fields are cut at 100k characters, but the failed-case panel in history reused the live panel's "Copy grabs the whole value" note, so a 100,013-character input copied 100,013 characters and nothing offered the rest. History now restores a cut input or expected value from the stored test case (only when the kept prefix matches, so an edited case is never passed off as the one the run saw), and where that is impossible the note says exactly what Copy hands over.