Rust-first · attempt-first · private by default

Learn the move.
Remember the reason.

Ten interview patterns built around the exact point where intuition usually breaks: what the state means, why a pointer moves, and which invariant makes the code safe.

Attempt → invariant → trace → retrieve

  1. Decode constraints.Decide which operations are safe and affordable.
  2. State the invariant.Name what must stay true before writing the loop.
  3. Expose help gradually.Use a nudge, derivation, trace, then code—in that order.
  4. Return later.Record the outcome and let the lab schedule retrieval.

Your retrieval queue

Progress stays in this browser. This device stores lesson IDs, outcomes, confidence, assistance level, and review dates—never your code or private reasoning.

0reviewed
10due now
0independent
01
Hash setCore medium

Longest Consecutive Sequence

Consecutive values, unsorted input, and an O(n) target.

Due now

How can each sequence be counted once without sorting?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • Duplicates do not change a sequence, so a set is the natural representation.
  • Fast membership matters more than order.
  • The value range is safe for stepping by one in the stated problem constraints.
02
Hash mapFoundation

Group Anagrams

Group different inputs that are equivalent under one transformation.

Due now

What representation is identical for every word in an anagram group?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • Words contain lowercase ASCII letters, so byte sorting is safe.
  • The grouped output order is irrelevant.
  • A hash-map key must own stable, hashable data.
03
Hash map + heapCore medium

Top K Frequent Elements

Repeatedly retrieve the highest-ranked items, where rank is not the item itself.

Due now

What belongs first in each heap tuple: the number or its frequency?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • Frequency counting needs one pass and one map entry per distinct number.
  • Rust BinaryHeap is a max-heap by default.
  • Tuple ordering compares the first field first, so frequency must be the primary score.
04
Sorted two pointersCore medium

3Sum

Find unique triples whose sum hits a target.

Due now

After fixing one number, what three cases decide which pointer moves?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • Sorting is allowed and exposes monotonic pointer movement.
  • The result must not contain duplicate triplets.
  • Use i64 for the temporary sum so addition cannot overflow i32.
05
Running optimumFoundation

Best Time to Buy and Sell Stock

Choose an earlier value and a later value to maximize their difference.

Due now

What single fact about the past is sufficient for every future selling day?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • The buy must occur before the sell, so process days from left to right.
  • Duplicate prices are legal and irrelevant.
  • No transaction is allowed, so initialize profit to zero.
06
Sliding windowCore medium

Longest Substring Without Repeating Characters

Longest contiguous range satisfying a condition that can be repaired from the left.

Due now

What must be true immediately before the window length is recorded?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • The standard problem uses ASCII characters, so byte indexing is valid.
  • The answer is a length, not the substring itself.
  • A previous position can move left forward, never backward.
07
Monotonic stackCore medium

Daily Temperatures

For every item, find the next later item that is greater.

Due now

What unfinished work should the stack remember?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • The answer is a distance, so store indices rather than temperatures alone.
  • Equal temperatures do not resolve each other.
  • Every index can be pushed once and popped at most once.
08
Stack machineCore medium

Evaluate Reverse Polish Notation

Operators appear after their operands and intermediate results feed later operations.

Due now

When an operator arrives, what exactly leaves and re-enters the stack?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • Tokens may be negative numbers, so numeric-string tests are fragile.
  • Every operator has two valid operands.
  • Integer division truncates toward zero, matching Rust integer division.
09
Linked list ownershipOwnership gate

Reverse Linked List in Rust

Reverse every next pointer in place while preserving access to the unprocessed suffix.

Due now

How do you move ownership of next without partially moving the current node?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • Nodes are owned through Option<Box<ListNode>>.
  • The next link must be detached before the current node is linked backward.
  • Only a constant number of owned pointers is needed.
10
Binary searchCore medium

Search a 2D Matrix

Rows are sorted and every row begins after the previous row ends.

Due now

How can one index address the matrix without allocating a flattened copy?

Say your answer aloud. Name the state and the rule that moves it. No typing is collected.

  • The matrix and first row are non-empty in the standard problem contract.
  • The global row-order property makes the entire matrix monotonically sorted.
  • Use usize for Rust indexing.

Built from learning signals, not private transcripts.

These lessons are an original synthesis of recurring misconceptions and durable interview patterns. No chat transcript, private answer, or learner-authored code is published or uploaded. OpenGrind is an independent open-source project and is not affiliated with LeetCode, NeetCode, Google, or any other interview platform or employer.