{"schemaVersion":1,"catalogVersion":"a9d2e7c19b55","source":{"repository":"https://github.com/sergii-ziborov/crabrix-courses","commit":"a9d2e7c19b552520b7d3668305f4d82a18420e00"},"platforms":{"web":"Every lesson listed here is public at its url.","app":"The Crabrix iOS app installs signed CoursePacks; a lesson can reach the app later than the website. Each lesson's appAvailability is \"released\" (in the App Store version) or \"next-app-version\"."},"courses":[{"id":"basics","title":"Rust Basics","subtitle":"A gradual path from the first line to small, reliable programs","level":"BEGINNER","order":0,"url":"https://crabrix.com/learn/basics/","lessonCount":29,"units":[{"id":"foundations","title":"Rust Foundations","subtitle":"Read, edit, compile, and trust rustc","lessonIds":["what-is-rust","hello-rust","variables","print-formatting","number-types","booleans-comparisons","chars-and-text","compiler-feedback"]},{"id":"expressions-flow","title":"Expressions & Flow","subtitle":"Build values, call functions, and repeat work","lessonIds":["types","operators","block-expressions","functions","function-parameters","control-flow","ranges"]},{"id":"small-programs","title":"Small Programs","subtitle":"Combine the pieces before data modeling","lessonIds":["loops","parsing","references-intro","methods-intro","recoverable-errors","debugging-values","comments-docs"]},{"id":"modeling","title":"Modeling Data","subtitle":"Make invalid states harder to express","lessonIds":["structs","enums","option-result","collections","strings","pattern-matching","derive"]}]},{"id":"algorithms","title":"Algorithms","subtitle":"200 reusable patterns, each taught twice and then proved in a Rust challenge","level":"EASY → HARD","order":1,"url":"https://crabrix.com/learn/algorithms/","lessonCount":600,"units":[{"id":"algorithms-scans","title":"Linear Scans & State","subtitle":"One pass, explicit state, and the invariants behind later patterns","lessonIds":["algorithm.linear-scan.model","algorithm.linear-scan.recognize","algorithm.linear-scan.challenge","algorithm.min-max-tracking.model","algorithm.min-max-tracking.recognize","algorithm.min-max-tracking.challenge","algorithm.frequency-counting.model","algorithm.frequency-counting.recognize","algorithm.frequency-counting.challenge","algorithm.running-accumulator.model","algorithm.running-accumulator.recognize","algorithm.running-accumulator.challenge","algorithm.adjacent-pair-scan.model","algorithm.adjacent-pair-scan.recognize","algorithm.adjacent-pair-scan.challenge","algorithm.stable-compaction.model","algorithm.stable-compaction.recognize","algorithm.stable-compaction.challenge","algorithm.predicate-partition.model","algorithm.predicate-partition.recognize","algorithm.predicate-partition.challenge","algorithm.boyer-moore-majority.model","algorithm.boyer-moore-majority.recognize","algorithm.boyer-moore-majority.challenge","algorithm.reservoir-sampling.model","algorithm.reservoir-sampling.recognize","algorithm.reservoir-sampling.challenge","algorithm.floyd-state-cycle.model","algorithm.floyd-state-cycle.recognize","algorithm.floyd-state-cycle.challenge"]},{"id":"algorithms-hashing","title":"Hash Maps & Sets","subtitle":"Trade memory for direct membership, grouping, and complement lookup","lessonIds":["algorithm.hash-membership.model","algorithm.hash-membership.recognize","algorithm.hash-membership.challenge","algorithm.hash-frequency.model","algorithm.hash-frequency.recognize","algorithm.hash-frequency.challenge","algorithm.complement-lookup.model","algorithm.complement-lookup.recognize","algorithm.complement-lookup.challenge","algorithm.group-by-key.model","algorithm.group-by-key.recognize","algorithm.group-by-key.challenge","algorithm.index-map.model","algorithm.index-map.recognize","algorithm.index-map.challenge","algorithm.coordinate-compression.model","algorithm.coordinate-compression.recognize","algorithm.coordinate-compression.challenge","algorithm.longest-consecutive-set.model","algorithm.longest-consecutive-set.recognize","algorithm.longest-consecutive-set.challenge","algorithm.bidirectional-map.model","algorithm.bidirectional-map.recognize","algorithm.bidirectional-map.challenge","algorithm.randomized-set.model","algorithm.randomized-set.recognize","algorithm.randomized-set.challenge","algorithm.rolling-fingerprint.model","algorithm.rolling-fingerprint.recognize","algorithm.rolling-fingerprint.challenge"]},{"id":"algorithms-ranges","title":"Prefix Sums & Range Queries","subtitle":"Precompute cumulative information so repeated range work becomes cheap","lessonIds":["algorithm.prefix-sum.model","algorithm.prefix-sum.recognize","algorithm.prefix-sum.challenge","algorithm.suffix-aggregate.model","algorithm.suffix-aggregate.recognize","algorithm.suffix-aggregate.challenge","algorithm.equilibrium-index.model","algorithm.equilibrium-index.recognize","algorithm.equilibrium-index.challenge","algorithm.difference-array.model","algorithm.difference-array.recognize","algorithm.difference-array.challenge","algorithm.prefix-suffix-product.model","algorithm.prefix-suffix-product.recognize","algorithm.prefix-suffix-product.challenge","algorithm.prefix-xor.model","algorithm.prefix-xor.recognize","algorithm.prefix-xor.challenge","algorithm.prefix-sum-2d.model","algorithm.prefix-sum-2d.recognize","algorithm.prefix-sum-2d.challenge","algorithm.imos-sweep.model","algorithm.imos-sweep.recognize","algorithm.imos-sweep.challenge","algorithm.fenwick-tree.model","algorithm.fenwick-tree.recognize","algorithm.fenwick-tree.challenge","algorithm.segment-tree.model","algorithm.segment-tree.recognize","algorithm.segment-tree.challenge"]},{"id":"algorithms-two-pointers","title":"Two Pointers","subtitle":"Use ordering or a maintained boundary to avoid nested scans","lessonIds":["algorithm.opposite-ends.model","algorithm.opposite-ends.recognize","algorithm.opposite-ends.challenge","algorithm.same-direction.model","algorithm.same-direction.recognize","algorithm.same-direction.challenge","algorithm.slow-fast.model","algorithm.slow-fast.recognize","algorithm.slow-fast.challenge","algorithm.sorted-two-sum.model","algorithm.sorted-two-sum.recognize","algorithm.sorted-two-sum.challenge","algorithm.palindrome-pointers.model","algorithm.palindrome-pointers.recognize","algorithm.palindrome-pointers.challenge","algorithm.three-sum.model","algorithm.three-sum.recognize","algorithm.three-sum.challenge","algorithm.dutch-flag.model","algorithm.dutch-flag.recognize","algorithm.dutch-flag.challenge","algorithm.container-area.model","algorithm.container-area.recognize","algorithm.container-area.challenge","algorithm.in-place-merge.model","algorithm.in-place-merge.recognize","algorithm.in-place-merge.challenge","algorithm.trapping-water.model","algorithm.trapping-water.recognize","algorithm.trapping-water.challenge"]},{"id":"algorithms-sliding-window","title":"Sliding Window","subtitle":"Maintain exactly the state of one contiguous region","lessonIds":["algorithm.fixed-window.model","algorithm.fixed-window.recognize","algorithm.fixed-window.challenge","algorithm.variable-window.model","algorithm.variable-window.recognize","algorithm.variable-window.challenge","algorithm.unique-window.model","algorithm.unique-window.recognize","algorithm.unique-window.challenge","algorithm.at-most-k.model","algorithm.at-most-k.recognize","algorithm.at-most-k.challenge","algorithm.exactly-k-difference.model","algorithm.exactly-k-difference.recognize","algorithm.exactly-k-difference.challenge","algorithm.frequency-balanced-window.model","algorithm.frequency-balanced-window.recognize","algorithm.frequency-balanced-window.challenge","algorithm.minimum-cover-window.model","algorithm.minimum-cover-window.recognize","algorithm.minimum-cover-window.challenge","algorithm.monotonic-deque-window.model","algorithm.monotonic-deque-window.recognize","algorithm.monotonic-deque-window.challenge","algorithm.rolling-window-statistic.model","algorithm.rolling-window-statistic.recognize","algorithm.rolling-window-statistic.challenge","algorithm.dual-heap-window-median.model","algorithm.dual-heap-window-median.recognize","algorithm.dual-heap-window-median.challenge"]},{"id":"algorithms-stacks-queues","title":"Stack, Queue & Monotonic Patterns","subtitle":"Choose the removal order that matches the dependency","lessonIds":["algorithm.delimiter-stack.model","algorithm.delimiter-stack.recognize","algorithm.delimiter-stack.challenge","algorithm.postfix-evaluation.model","algorithm.postfix-evaluation.recognize","algorithm.postfix-evaluation.challenge","algorithm.min-stack.model","algorithm.min-stack.recognize","algorithm.min-stack.challenge","algorithm.queue-with-stacks.model","algorithm.queue-with-stacks.recognize","algorithm.queue-with-stacks.challenge","algorithm.next-greater-stack.model","algorithm.next-greater-stack.recognize","algorithm.next-greater-stack.challenge","algorithm.monotonic-increasing-stack.model","algorithm.monotonic-increasing-stack.recognize","algorithm.monotonic-increasing-stack.challenge","algorithm.monotonic-decreasing-stack.model","algorithm.monotonic-decreasing-stack.recognize","algorithm.monotonic-decreasing-stack.challenge","algorithm.circular-monotonic-stack.model","algorithm.circular-monotonic-stack.recognize","algorithm.circular-monotonic-stack.challenge","algorithm.expression-shunting-yard.model","algorithm.expression-shunting-yard.recognize","algorithm.expression-shunting-yard.challenge","algorithm.largest-histogram.model","algorithm.largest-histogram.recognize","algorithm.largest-histogram.challenge"]},{"id":"algorithms-sorting-selection","title":"Sorting & Selection","subtitle":"Order everything, or isolate only the rank the problem needs","lessonIds":["algorithm.insertion-sort.model","algorithm.insertion-sort.recognize","algorithm.insertion-sort.challenge","algorithm.selection-sort.model","algorithm.selection-sort.recognize","algorithm.selection-sort.challenge","algorithm.merge-sort.model","algorithm.merge-sort.recognize","algorithm.merge-sort.challenge","algorithm.quicksort.model","algorithm.quicksort.recognize","algorithm.quicksort.challenge","algorithm.heap-sort.model","algorithm.heap-sort.recognize","algorithm.heap-sort.challenge","algorithm.counting-sort.model","algorithm.counting-sort.recognize","algorithm.counting-sort.challenge","algorithm.radix-sort.model","algorithm.radix-sort.recognize","algorithm.radix-sort.challenge","algorithm.bucket-sort.model","algorithm.bucket-sort.recognize","algorithm.bucket-sort.challenge","algorithm.quickselect.model","algorithm.quickselect.recognize","algorithm.quickselect.challenge","algorithm.median-of-medians.model","algorithm.median-of-medians.recognize","algorithm.median-of-medians.challenge"]},{"id":"algorithms-binary-search","title":"Binary Search","subtitle":"Exploit a monotone decision boundary, not only a sorted Vec","lessonIds":["algorithm.binary-exact.model","algorithm.binary-exact.recognize","algorithm.binary-exact.challenge","algorithm.lower-bound.model","algorithm.lower-bound.recognize","algorithm.lower-bound.challenge","algorithm.upper-bound.model","algorithm.upper-bound.recognize","algorithm.upper-bound.challenge","algorithm.first-last-position.model","algorithm.first-last-position.recognize","algorithm.first-last-position.challenge","algorithm.rotated-search.model","algorithm.rotated-search.recognize","algorithm.rotated-search.challenge","algorithm.peak-search.model","algorithm.peak-search.recognize","algorithm.peak-search.challenge","algorithm.matrix-binary-search.model","algorithm.matrix-binary-search.recognize","algorithm.matrix-binary-search.challenge","algorithm.binary-search-answer.model","algorithm.binary-search-answer.recognize","algorithm.binary-search-answer.challenge","algorithm.exponential-search.model","algorithm.exponential-search.recognize","algorithm.exponential-search.challenge","algorithm.partition-median.model","algorithm.partition-median.recognize","algorithm.partition-median.challenge"]},{"id":"algorithms-linked-lists","title":"Linked List Techniques","subtitle":"Rewire ownership-like links without losing the unread suffix","lessonIds":["algorithm.list-reversal.model","algorithm.list-reversal.recognize","algorithm.list-reversal.challenge","algorithm.list-middle.model","algorithm.list-middle.recognize","algorithm.list-middle.challenge","algorithm.list-cycle.model","algorithm.list-cycle.recognize","algorithm.list-cycle.challenge","algorithm.merge-two-lists.model","algorithm.merge-two-lists.recognize","algorithm.merge-two-lists.challenge","algorithm.remove-nth-from-end.model","algorithm.remove-nth-from-end.recognize","algorithm.remove-nth-from-end.challenge","algorithm.list-intersection.model","algorithm.list-intersection.recognize","algorithm.list-intersection.challenge","algorithm.partition-list.model","algorithm.partition-list.recognize","algorithm.partition-list.challenge","algorithm.reorder-list.model","algorithm.reorder-list.recognize","algorithm.reorder-list.challenge","algorithm.copy-random-list.model","algorithm.copy-random-list.recognize","algorithm.copy-random-list.challenge","algorithm.reverse-k-group.model","algorithm.reverse-k-group.recognize","algorithm.reverse-k-group.challenge"]},{"id":"algorithms-trees","title":"Tree Traversal & BST","subtitle":"Choose traversal order from when a node's result becomes known","lessonIds":["algorithm.tree-preorder.model","algorithm.tree-preorder.recognize","algorithm.tree-preorder.challenge","algorithm.tree-inorder.model","algorithm.tree-inorder.recognize","algorithm.tree-inorder.challenge","algorithm.tree-postorder.model","algorithm.tree-postorder.recognize","algorithm.tree-postorder.challenge","algorithm.tree-level-order.model","algorithm.tree-level-order.recognize","algorithm.tree-level-order.challenge","algorithm.tree-height-balance.model","algorithm.tree-height-balance.recognize","algorithm.tree-height-balance.challenge","algorithm.bst-search-insert.model","algorithm.bst-search-insert.recognize","algorithm.bst-search-insert.challenge","algorithm.lowest-common-ancestor.model","algorithm.lowest-common-ancestor.recognize","algorithm.lowest-common-ancestor.challenge","algorithm.tree-serialize.model","algorithm.tree-serialize.recognize","algorithm.tree-serialize.challenge","algorithm.tree-diameter.model","algorithm.tree-diameter.recognize","algorithm.tree-diameter.challenge","algorithm.tree-rerooting.model","algorithm.tree-rerooting.recognize","algorithm.tree-rerooting.challenge"]},{"id":"algorithms-heaps-streaming","title":"Heaps & Streaming","subtitle":"Keep only the next best candidate instead of fully ordering the world","lessonIds":["algorithm.binary-heap.model","algorithm.binary-heap.recognize","algorithm.binary-heap.challenge","algorithm.top-k-minheap.model","algorithm.top-k-minheap.recognize","algorithm.top-k-minheap.challenge","algorithm.kth-stream.model","algorithm.kth-stream.recognize","algorithm.kth-stream.challenge","algorithm.k-way-merge.model","algorithm.k-way-merge.recognize","algorithm.k-way-merge.challenge","algorithm.closest-k-heap.model","algorithm.closest-k-heap.recognize","algorithm.closest-k-heap.challenge","algorithm.two-heap-median.model","algorithm.two-heap-median.recognize","algorithm.two-heap-median.challenge","algorithm.lazy-heap-deletion.model","algorithm.lazy-heap-deletion.recognize","algorithm.lazy-heap-deletion.challenge","algorithm.priority-scheduling.model","algorithm.priority-scheduling.recognize","algorithm.priority-scheduling.challenge","algorithm.meeting-rooms-heap.model","algorithm.meeting-rooms-heap.recognize","algorithm.meeting-rooms-heap.challenge","algorithm.huffman-greedy-heap.model","algorithm.huffman-greedy-heap.recognize","algorithm.huffman-greedy-heap.challenge"]},{"id":"algorithms-graph-traversal","title":"DFS, BFS & Graph Traversal","subtitle":"Represent edges explicitly, then control frontier and visited state","lessonIds":["algorithm.adjacency-list.model","algorithm.adjacency-list.recognize","algorithm.adjacency-list.challenge","algorithm.graph-dfs.model","algorithm.graph-dfs.recognize","algorithm.graph-dfs.challenge","algorithm.graph-bfs.model","algorithm.graph-bfs.recognize","algorithm.graph-bfs.challenge","algorithm.connected-components.model","algorithm.connected-components.recognize","algorithm.connected-components.challenge","algorithm.grid-flood-fill.model","algorithm.grid-flood-fill.recognize","algorithm.grid-flood-fill.challenge","algorithm.bipartite-coloring.model","algorithm.bipartite-coloring.recognize","algorithm.bipartite-coloring.challenge","algorithm.undirected-cycle.model","algorithm.undirected-cycle.recognize","algorithm.undirected-cycle.challenge","algorithm.kahn-topological.model","algorithm.kahn-topological.recognize","algorithm.kahn-topological.challenge","algorithm.dfs-topological.model","algorithm.dfs-topological.recognize","algorithm.dfs-topological.challenge","algorithm.strong-components.model","algorithm.strong-components.recognize","algorithm.strong-components.challenge"]},{"id":"algorithms-weighted-graphs","title":"Shortest Paths, MST & Flow","subtitle":"Match edge guarantees to the correct shortest-path or connectivity proof","lessonIds":["algorithm.dijkstra.model","algorithm.dijkstra.recognize","algorithm.dijkstra.challenge","algorithm.zero-one-bfs.model","algorithm.zero-one-bfs.recognize","algorithm.zero-one-bfs.challenge","algorithm.dag-shortest-path.model","algorithm.dag-shortest-path.recognize","algorithm.dag-shortest-path.challenge","algorithm.prim-mst.model","algorithm.prim-mst.recognize","algorithm.prim-mst.challenge","algorithm.kruskal-mst.model","algorithm.kruskal-mst.recognize","algorithm.kruskal-mst.challenge","algorithm.bellman-ford.model","algorithm.bellman-ford.recognize","algorithm.bellman-ford.challenge","algorithm.floyd-warshall.model","algorithm.floyd-warshall.recognize","algorithm.floyd-warshall.challenge","algorithm.a-star.model","algorithm.a-star.recognize","algorithm.a-star.challenge","algorithm.bidirectional-bfs.model","algorithm.bidirectional-bfs.recognize","algorithm.bidirectional-bfs.challenge","algorithm.dinic-max-flow.model","algorithm.dinic-max-flow.recognize","algorithm.dinic-max-flow.challenge"]},{"id":"algorithms-backtracking","title":"Backtracking & Exhaustive Search","subtitle":"Build a candidate, reject early, and undo exactly what you changed","lessonIds":["algorithm.subsets.model","algorithm.subsets.recognize","algorithm.subsets.challenge","algorithm.permutations.model","algorithm.permutations.recognize","algorithm.permutations.challenge","algorithm.combinations.model","algorithm.combinations.recognize","algorithm.combinations.challenge","algorithm.combination-sum.model","algorithm.combination-sum.recognize","algorithm.combination-sum.challenge","algorithm.parentheses-generation.model","algorithm.parentheses-generation.recognize","algorithm.parentheses-generation.challenge","algorithm.word-grid-search.model","algorithm.word-grid-search.recognize","algorithm.word-grid-search.challenge","algorithm.palindrome-partition.model","algorithm.palindrome-partition.recognize","algorithm.palindrome-partition.challenge","algorithm.n-queens.model","algorithm.n-queens.recognize","algorithm.n-queens.challenge","algorithm.sudoku.model","algorithm.sudoku.recognize","algorithm.sudoku.challenge","algorithm.meet-in-middle.model","algorithm.meet-in-middle.recognize","algorithm.meet-in-middle.challenge"]},{"id":"algorithms-greedy-intervals","title":"Greedy & Interval Methods","subtitle":"Make a locally safe commitment and prove what future choices remain","lessonIds":["algorithm.activity-selection.model","algorithm.activity-selection.recognize","algorithm.activity-selection.challenge","algorithm.merge-intervals.model","algorithm.merge-intervals.recognize","algorithm.merge-intervals.challenge","algorithm.insert-interval.model","algorithm.insert-interval.recognize","algorithm.insert-interval.challenge","algorithm.sweep-line-events.model","algorithm.sweep-line-events.recognize","algorithm.sweep-line-events.challenge","algorithm.jump-game.model","algorithm.jump-game.recognize","algorithm.jump-game.challenge","algorithm.jump-game-two.model","algorithm.jump-game-two.recognize","algorithm.jump-game-two.challenge","algorithm.gas-station.model","algorithm.gas-station.recognize","algorithm.gas-station.challenge","algorithm.partition-labels.model","algorithm.partition-labels.recognize","algorithm.partition-labels.challenge","algorithm.deadline-scheduling.model","algorithm.deadline-scheduling.recognize","algorithm.deadline-scheduling.challenge","algorithm.minimum-arrows.model","algorithm.minimum-arrows.recognize","algorithm.minimum-arrows.challenge"]},{"id":"algorithms-dynamic-1d","title":"1D Dynamic Programming","subtitle":"Define one state, its transition, base cases, and evaluation order","lessonIds":["algorithm.memoization.model","algorithm.memoization.recognize","algorithm.memoization.challenge","algorithm.tabulation.model","algorithm.tabulation.recognize","algorithm.tabulation.challenge","algorithm.rolling-dp.model","algorithm.rolling-dp.recognize","algorithm.rolling-dp.challenge","algorithm.house-robber.model","algorithm.house-robber.recognize","algorithm.house-robber.challenge","algorithm.kadane.model","algorithm.kadane.recognize","algorithm.kadane.challenge","algorithm.coin-change-min.model","algorithm.coin-change-min.recognize","algorithm.coin-change-min.challenge","algorithm.word-break-dp.model","algorithm.word-break-dp.recognize","algorithm.word-break-dp.challenge","algorithm.decode-ways.model","algorithm.decode-ways.recognize","algorithm.decode-ways.challenge","algorithm.lis-patience.model","algorithm.lis-patience.recognize","algorithm.lis-patience.challenge","algorithm.zero-one-knapsack.model","algorithm.zero-one-knapsack.recognize","algorithm.zero-one-knapsack.challenge"]},{"id":"algorithms-dynamic-2d","title":"2D & Advanced Dynamic Programming","subtitle":"Model two dimensions, intervals, subsets, and compressed state spaces","lessonIds":["algorithm.grid-path-dp.model","algorithm.grid-path-dp.recognize","algorithm.grid-path-dp.challenge","algorithm.subset-sum.model","algorithm.subset-sum.recognize","algorithm.subset-sum.challenge","algorithm.longest-common-subsequence.model","algorithm.longest-common-subsequence.recognize","algorithm.longest-common-subsequence.challenge","algorithm.edit-distance.model","algorithm.edit-distance.recognize","algorithm.edit-distance.challenge","algorithm.longest-pal-subsequence.model","algorithm.longest-pal-subsequence.recognize","algorithm.longest-pal-subsequence.challenge","algorithm.matrix-chain.model","algorithm.matrix-chain.recognize","algorithm.matrix-chain.challenge","algorithm.interval-dp.model","algorithm.interval-dp.recognize","algorithm.interval-dp.challenge","algorithm.digit-dp.model","algorithm.digit-dp.recognize","algorithm.digit-dp.challenge","algorithm.bitmask-dp.model","algorithm.bitmask-dp.recognize","algorithm.bitmask-dp.challenge","algorithm.tree-dp.model","algorithm.tree-dp.recognize","algorithm.tree-dp.challenge"]},{"id":"algorithms-strings-tries","title":"Tries & String Matching","subtitle":"Respect bytes versus characters, then exploit prefixes and borders","lessonIds":["algorithm.string-frequency.model","algorithm.string-frequency.recognize","algorithm.string-frequency.challenge","algorithm.string-two-pointers.model","algorithm.string-two-pointers.recognize","algorithm.string-two-pointers.challenge","algorithm.run-length-encoding.model","algorithm.run-length-encoding.recognize","algorithm.run-length-encoding.challenge","algorithm.kmp.model","algorithm.kmp.recognize","algorithm.kmp.challenge","algorithm.z-algorithm.model","algorithm.z-algorithm.recognize","algorithm.z-algorithm.challenge","algorithm.rabin-karp.model","algorithm.rabin-karp.recognize","algorithm.rabin-karp.challenge","algorithm.trie.model","algorithm.trie.recognize","algorithm.trie.challenge","algorithm.aho-corasick.model","algorithm.aho-corasick.recognize","algorithm.aho-corasick.challenge","algorithm.suffix-array.model","algorithm.suffix-array.recognize","algorithm.suffix-array.challenge","algorithm.manacher.model","algorithm.manacher.recognize","algorithm.manacher.challenge"]},{"id":"algorithms-math-bits","title":"Math, Bits & Combinatorics","subtitle":"Replace simulation with algebraic structure and binary identities","lessonIds":["algorithm.euclid-gcd.model","algorithm.euclid-gcd.recognize","algorithm.euclid-gcd.challenge","algorithm.bitmask-enumeration.model","algorithm.bitmask-enumeration.recognize","algorithm.bitmask-enumeration.challenge","algorithm.xor-cancellation.model","algorithm.xor-cancellation.recognize","algorithm.xor-cancellation.challenge","algorithm.sieve.model","algorithm.sieve.recognize","algorithm.sieve.challenge","algorithm.fast-power.model","algorithm.fast-power.recognize","algorithm.fast-power.challenge","algorithm.modular-inverse.model","algorithm.modular-inverse.recognize","algorithm.modular-inverse.challenge","algorithm.binomial-coefficients.model","algorithm.binomial-coefficients.recognize","algorithm.binomial-coefficients.challenge","algorithm.gray-code.model","algorithm.gray-code.recognize","algorithm.gray-code.challenge","algorithm.matrix-exponentiation.model","algorithm.matrix-exponentiation.recognize","algorithm.matrix-exponentiation.challenge","algorithm.miller-rabin.model","algorithm.miller-rabin.recognize","algorithm.miller-rabin.challenge"]},{"id":"algorithms-advanced-structures","title":"Advanced Data Structures","subtitle":"Compose range, ordering, and decomposition techniques for hard constraints","lessonIds":["algorithm.sparse-table.model","algorithm.sparse-table.recognize","algorithm.sparse-table.challenge","algorithm.disjoint-set-union.model","algorithm.disjoint-set-union.recognize","algorithm.disjoint-set-union.challenge","algorithm.lazy-segment-tree.model","algorithm.lazy-segment-tree.recognize","algorithm.lazy-segment-tree.challenge","algorithm.treap.model","algorithm.treap.recognize","algorithm.treap.challenge","algorithm.skip-list.model","algorithm.skip-list.recognize","algorithm.skip-list.challenge","algorithm.dsu-rollback.model","algorithm.dsu-rollback.recognize","algorithm.dsu-rollback.challenge","algorithm.mo-algorithm.model","algorithm.mo-algorithm.recognize","algorithm.mo-algorithm.challenge","algorithm.heavy-light.model","algorithm.heavy-light.recognize","algorithm.heavy-light.challenge","algorithm.centroid-decomposition.model","algorithm.centroid-decomposition.recognize","algorithm.centroid-decomposition.challenge","algorithm.suffix-automaton.model","algorithm.suffix-automaton.recognize","algorithm.suffix-automaton.challenge"]}]},{"id":"ownership","title":"Ownership Mastery","subtitle":"Borrowing, lifetimes, traits, iterators, and compiler-guided repair","level":"INTERMEDIATE","order":2,"url":"https://crabrix.com/learn/ownership/","lessonCount":31,"units":[{"id":"ownership","title":"Ownership & Borrowing","subtitle":"The ideas that make Rust different","lessonIds":["ownership","borrowing","slices","copy-clone","drop-order","lifetimes-intro"]},{"id":"abstraction","title":"Rust Abstractions","subtitle":"Reuse without hiding the cost","lessonIds":["generics","traits","lifetimes","closures","iterators","iterator-impl","associated-types","operator-traits"]},{"id":"ownership-practice","title":"Ownership in Practice","subtitle":"Make borrowing choices in real function boundaries","lessonIds":["move-functions","mutable-borrows","reborrowing","partial-moves","interior-mutability-intro","lifetime-elision","owned-or-borrowed"]},{"id":"abstraction-practice","title":"Abstractions in Practice","subtitle":"Choose dispatch, adapters, and capture deliberately","lessonIds":["trait-objects","blanket-impls","default-trait-methods","generic-lifetimes","iterator-adapters","closure-capture-modes","phantom-data"]},{"id":"api-boundaries","title":"API Boundaries","subtitle":"Parse once, borrow flexibly, and preserve error meaning","lessonIds":["fromstr-domain-values","option-result-transpose","asref-borrowed-inputs"]}]},{"id":"projects","title":"Cargo & Real Projects","subtitle":"Cargo, library contracts, and the Git → CLI → HTTP → SQL → delivery route","level":"ADVANCED","order":3,"url":"https://crabrix.com/learn/projects/","lessonCount":53,"units":[{"id":"projects","title":"Real Projects","subtitle":"Cargo-shaped code beyond one file","lessonIds":["modules","testing","errors","dependencies","workspaces"]},{"id":"pointers","title":"Smart Pointers","subtitle":"Ownership shapes beyond a plain value","lessonIds":["box","rc-refcell","deref-drop","cycles"]},{"id":"cargo-workflow","title":"Cargo Workflow","subtitle":"Understand what each project file and command controls","lessonIds":["package-layout","cargo-command-cycle","dependency-kinds","feature-design","lockfile-reproducibility"]},{"id":"project-quality","title":"Project Quality","subtitle":"Tests, docs, errors, and release behavior","lessonIds":["integration-tests","error-context","doc-examples","release-profiles"]},{"id":"files-data","title":"Files & Data","subtitle":"Read, validate, transform, and save a small data report","lessonIds":["buffered-line-input","paths-and-boundaries","sandbox-file-roundtrip","validated-records","serde-roundtrip-validation"]},{"id":"reliability-labs","title":"Reliability Labs","subtitle":"Properties, hostile input, and regression cases","lessonIds":["properties-and-oracles","hostile-parser-inputs","unicode-regression-tests"]},{"id":"library-contracts","title":"Library Contracts","subtitle":"SemVer, MSRV and unchanged downstream consumers","lessonIds":["public-api-compatibility","msrv-verification","feature-compatibility-matrix"]},{"id":"route-git","title":"Git: Changes to History","subtitle":"Review, commit, branch and recover","lessonIds":["route-git-review","route-git-select","route-git-branch","route-git-recover"]},{"id":"route-cli","title":"CLI: A Reliable Interface","subtitle":"Arguments, configuration, streams and exit codes","lessonIds":["route-cli-arguments","route-cli-config","route-cli-streams","route-cli-exit"]},{"id":"route-http","title":"HTTP API: Explicit Contracts","subtitle":"Routing, request limits, responses and retries","lessonIds":["route-http-routing","route-http-limits","route-http-json","route-http-idempotency"]},{"id":"route-sql","title":"SQL: Durable State","subtitle":"Schema, queries, parameters and atomic changes","lessonIds":["route-sql-schema","route-sql-query","route-sql-parameters","route-sql-transactions"]},{"id":"route-diagnostics","title":"Diagnostics: Explain a Failure","subtitle":"Context, correlation, latency and retry budgets","lessonIds":["route-diag-context","route-diag-correlation","route-diag-latency","route-diag-retries"]},{"id":"route-delivery","title":"Delivery: A Repeatable Release","subtitle":"Checks, configuration, artifacts and rollback","lessonIds":["route-delivery-gates","route-delivery-config","route-delivery-artifacts","route-delivery-rollback"]}]},{"id":"concurrency","title":"Concurrency & Async","subtitle":"Threads, channels, shared state, and async/await","level":"ADVANCED","order":4,"url":"https://crabrix.com/learn/concurrency/","lessonCount":17,"units":[{"id":"threads","title":"Fearless Concurrency","subtitle":"Share data across threads without data races","lessonIds":["concurrency","channels","shared-state","send-sync"]},{"id":"async","title":"Async Rust","subtitle":"Concurrency without a thread per task","lessonIds":["futures","async-runtime","async-patterns"]},{"id":"concurrency-safety","title":"Concurrency Safety","subtitle":"Reason about lifetime, locks, and atomic state","lessonIds":["scoped-threads","mutex-poisoning","atomics-basics","deadlock-avoidance"]},{"id":"async-reliability","title":"Async Reliability","subtitle":"Pin work, cancel safely, and isolate blocking calls","lessonIds":["pinning-intuition","async-cancellation","blocking-async"]},{"id":"async-operations","title":"Async Operations","subtitle":"Own tasks, bound concurrency, and shut down deliberately","lessonIds":["joinset-task-ownership","semaphore-backpressure","graceful-shutdown-protocol"]}]},{"id":"systems","title":"Macros & Systems Rust","subtitle":"Metaprogramming, unsafe, FFI, performance, and idioms","level":"EXPERT","order":5,"url":"https://crabrix.com/learn/systems/","lessonCount":17,"units":[{"id":"meta","title":"Macros & Metaprogramming","subtitle":"Code that writes code, checked by the compiler","lessonIds":["declarative-macros","proc-macros","cfg-features"]},{"id":"systems","title":"Systems Rust","subtitle":"The unchecked edges, handled carefully","lessonIds":["unsafe","ffi","performance","idioms"]},{"id":"macro-design","title":"Macro Design","subtitle":"Keep generated code predictable and debuggable","lessonIds":["macro-hygiene","token-trees","proc-macro-boundaries"]},{"id":"unsafe-engineering","title":"Unsafe Engineering","subtitle":"State invariants, control layout, and measure first","lessonIds":["raw-pointers","repr-layout","unsafe-traits","benchmarking-profiling"]},{"id":"wasm-wasi","title":"Rust, WASM & WASI","subtitle":"Separate the language, the module, and the host's authority","lessonIds":["wasm-host-boundaries","wasm-linear-memory","runtime-resource-budgets"]}]},{"id":"interview","title":"Rust Interview Prep","subtitle":"52 practical Rust interview topics: ownership, async, APIs, systems and live coding","level":"CAREER","order":6,"url":"https://crabrix.com/learn/interview/","lessonCount":52,"units":[{"id":"interview-language","title":"Core Rust Questions","subtitle":"Answer with a model, not memorized jargon","lessonIds":["q-ownership","q-borrowing","q-lifetimes","q-option-result"]},{"id":"interview-systems","title":"Systems Design Questions","subtitle":"Show how Rust's guarantees affect architecture","lessonIds":["q-send-sync","q-box-rc-arc","q-dyn-generics","q-unsafe"]},{"id":"interview-concurrency","title":"Concurrency in Depth","subtitle":"The follow-up questions after Send and Sync","lessonIds":["q-atomics","q-deadlock","q-channels-vs-mutex","q-async-vs-threads","q-blocking-async","q-cancellation"]},{"id":"interview-platform","title":"Systems and Networking","subtitle":"The layer under your Rust service, which interviews always reach","lessonIds":["q-stack-heap","q-virtual-memory","q-syscalls","q-tcp-udp","q-http-versions","q-tls","q-backpressure"]},{"id":"interview-data","title":"Data and Distributed Systems","subtitle":"The half of a backend interview that is not the language","lessonIds":["q-acid","q-indexes","q-cap","q-idempotency","q-caching"]},{"id":"interview-craft","title":"Engineering Craft","subtitle":"How you work, which is the part every panel scores","lessonIds":["q-complexity","q-hashmap","q-testing-strategy","q-api-design","q-perf-profiling","q-ffi-abi"]},{"id":"interview-live-coding","title":"Live Coding","subtitle":"Turn an unclear prompt into testable Rust","lessonIds":["q-two-sum-rust","q-lru-design","q-parser-design","q-debugging-session"]},{"id":"interview-delivery","title":"Engineering Communication","subtitle":"Show the reasoning behind a technical decision","lessonIds":["q-tradeoff-communication","q-requirements","q-code-review","q-postmortem"]},{"id":"interview-values","title":"Values, Text and Callbacks","subtitle":"Reason about real value and text boundaries","lessonIds":["q-interior-mutability","q-copy-clone-cow","q-utf8-boundaries","q-iterator-ownership"]},{"id":"interview-async-contracts","title":"Future and Callback Contracts","subtitle":"Separate capture, pinning, Send and lock scope","lessonIds":["q-closure-traits","q-pin-future","q-future-send","q-async-locks"]},{"id":"interview-api-boundaries","title":"API and Numeric Boundaries","subtitle":"Design interfaces with explicit future, error and arithmetic contracts","lessonIds":["q-async-traits","q-error-boundaries","q-trait-coherence","q-integer-boundaries"]}]},{"id":"rust-for-c-developers","title":"Rust for C Developers","subtitle":"Map malloc/free, pointers, errno, tagged unions and make onto ownership, borrows, Result, enums and Cargo","level":"FOR C DEVELOPERS","order":8,"url":"https://crabrix.com/learn/rust-for-c-developers/","lessonCount":20,"units":[{"id":"c-rust-at-a-glance","title":"Rust at a glance","subtitle":"What stays the same, what safe Rust rules out, and how to read rustc","lessonIds":["c-what-rust-is","c-what-safe-rust-rules-out","c-rustc-diagnostics"]},{"id":"c-syntax","title":"Familiar syntax, different defaults","subtitle":"printf, const, integer rules, expressions and loops","lessonIds":["c-printf-to-println","c-const-by-default","c-integer-overflow-and-casts","c-functions-are-expressions","c-for-loops-to-ranges"]},{"id":"c-memory","title":"Memory without malloc and free","subtitle":"Owners, borrows, slices and lifetimes instead of conventions","lessonIds":["c-malloc-free-to-ownership","c-pointers-to-references","c-pointer-length-to-slices","c-dangling-pointers-to-lifetimes","c-struct-copy-to-copy-clone"]},{"id":"c-data","title":"Data, absence and errors","subtitle":"Methods, tagged unions, NULL, errno and text","lessonIds":["c-structs-to-impl","c-tagged-unions-to-enums","c-null-and-errno-to-option-result","c-char-arrays-to-strings"]},{"id":"c-systems","title":"Build, unsafe, FFI and threads","subtitle":"Cargo, the unsafe boundary and data-race-free threads","lessonIds":["c-make-and-headers-to-cargo","c-unsafe-and-ffi","c-pthreads-to-threads"]}]},{"id":"rust-for-nodejs-developers","title":"Rust for Node.js Developers","subtitle":"Map JavaScript and TypeScript habits to Rust: objects, null and undefined, array methods, try/catch, npm and Promises","level":"FOR NODE.JS DEVELOPERS","order":9,"url":"https://crabrix.com/learn/rust-for-nodejs-developers/","lessonCount":20,"units":[{"id":"node-rust-at-a-glance","title":"Rust at a glance","subtitle":"What changes when code is compiled ahead of time, owned and statically typed","lessonIds":["node-what-rust-is","node-no-garbage-collector","node-types-are-checked-not-erased"]},{"id":"node-values","title":"Values and types","subtitle":"Bindings, numbers, functions and conditions without coercion","lessonIds":["node-console-log-to-println","node-let-const-to-let-mut","node-number-to-integer-types","node-functions-to-fn","node-truthiness-to-bool-and-match"]},{"id":"node-data","title":"Data shapes","subtitle":"Objects, unions, null, arrays, maps and strings in Rust types","lessonIds":["node-objects-to-structs","node-ts-unions-to-enums","node-null-undefined-to-option","node-array-methods-to-iterators","node-map-and-objects-to-hashmap","node-utf16-strings-to-utf8"]},{"id":"node-ownership","title":"What the garbage collector hid","subtitle":"Moves, borrows and nominal traits instead of shared references","lessonIds":["node-shared-references-to-ownership","node-mutation-to-borrowing","node-interfaces-to-traits"]},{"id":"node-runtime","title":"Errors, packages and async","subtitle":"try/catch, npm and Promises mapped to Result, Cargo and futures","lessonIds":["node-try-catch-to-result","node-npm-to-cargo","node-promises-to-futures"]}]}],"lessons":[{"courseId":"basics","unitId":"foundations","id":"what-is-rust","title":"What Rust Is","concept":"A compiled language without a garbage collector","summary":"Rust is a compiled, statically typed language without a garbage collector. The compiler checks types, ownership and borrowing before your program runs, then produces a native program.","rule":"Rust is a compiled, statically typed language without a garbage collector: rustc checks types, ownership and borrowing before the program runs, then produces a native executable.","minutes":7,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/what-is-rust/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"next-app-version"},{"courseId":"basics","unitId":"foundations","id":"hello-rust","title":"Hello, Rust","concept":"Functions and stdout","summary":"A small Rust program gives you the whole development loop: write a function, let the compiler check it, run it, and inspect what appeared on stdout.","rule":"Execution begins in `fn main()`. `println!` is a compile-time-checked macro that writes a formatted line to stdout when the program runs.","minutes":10,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/hello-rust/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"foundations","id":"variables","title":"Variables","concept":"let, mut, and shadowing","summary":"A binding names a value. Rust keeps that binding fixed by default, asks for `mut` when the value must change, and uses a fresh `let` when you want to shadow it.","rule":"`mut` permits mutation; shadowing hides the old binding behind a new one.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/variables/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"foundations","id":"print-formatting","title":"Printing Values","concept":"Format strings and placeholders","summary":"A format string is a checked template: each placeholder has a value, and the finished line follows the template exactly, including spaces and alignment.","rule":"Every formatting placeholder must have a value known to `println!`.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/print-formatting/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"foundations","id":"number-types","title":"Numbers","concept":"Integer and floating-point types","summary":"Choosing a number type records a promise about range and precision. Rust makes conversions explicit so that promise cannot change silently at an arithmetic boundary.","rule":"Numeric conversions are explicit because ranges and precision differ.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/number-types/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"foundations","id":"booleans-comparisons","title":"Booleans","concept":"Comparisons and logical operators","summary":"A comparison produces a `bool`, and a branch requires one. `&&` and `||` can skip their right-hand expression as soon as the result is known.","rule":"`if` requires `bool`; Rust has no implicit numeric truthiness.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/booleans-comparisons/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"foundations","id":"chars-and-text","title":"Characters & Text","concept":"char, &str, and Unicode","summary":"Rust text has several useful units: bytes for encoding, Unicode scalar values for `char`, and sometimes multiple scalars for one visible symbol.","rule":"`String` indexing by an arbitrary byte is forbidden because UTF-8 boundaries matter.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/chars-and-text/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"foundations","id":"compiler-feedback","title":"Reading rustc","concept":"Expected, found, spans, and help","summary":"A compiler diagnostic is a map back to the source: find its primary span, compare expected with found, and make one intentional fix before reading follow-up errors.","rule":"Repair the first causal error before chasing its downstream messages.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/compiler-feedback/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"types","title":"Compound Types","concept":"Tuples, arrays, and annotations","summary":"Rust checks scalar and compound types before the program runs.","rule":"A tuple mixes types by position; an array holds one type with a fixed length.","minutes":11,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/types/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"operators","title":"Operators & Casting","concept":"Arithmetic, overflow, and as","summary":"Numeric operations have type-dependent bounds. Choose checked, wrapping or saturating behavior explicitly and validate narrowing conversions.","rule":"Numeric operands need compatible types; choose the overflow policy explicitly.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/operators/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"block-expressions","title":"Block Expressions","concept":"Statements, tail values, and semicolons","summary":"A block can perform statements and then produce one final value.","rule":"No semicolon means a tail value; a semicolon turns it into `()`.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/block-expressions/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"functions","title":"Functions","concept":"Returns and expression bodies","summary":"A function signature is a contract the compiler enforces at every call site.","rule":"The last expression without a semicolon is the return value.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/functions/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"function-parameters","title":"Parameters","concept":"Typed inputs and arguments","summary":"A function signature is a compact contract for every caller.","rule":"Parameters need explicit types; arguments must satisfy them.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/function-parameters/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"control-flow","title":"Control Flow","concept":"if and match as expressions","summary":"Expressions and loops model decisions without hidden coercion.","rule":"`if` is an expression; every branch must produce the same type.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/control-flow/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"expressions-flow","id":"ranges","title":"Ranges","concept":"Exclusive and inclusive boundaries","summary":"Range syntax makes boundaries visible instead of hiding an off-by-one rule.","rule":"`a..b` excludes `b`; `a..=b` includes `b`.","minutes":10,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/ranges/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"loops","title":"Loops","concept":"for, while, loop, break, and continue","summary":"Choose the loop form that states why repetition ends.","rule":"Prefer `for` for iteration; use `loop` when `break` defines the exit.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/loops/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"parsing","title":"Parsing Values","concept":"Turning text into typed data","summary":"Parsing crosses from untrusted text into a type with explicit success or failure.","rule":"Parsing returns `Result` because input text is not guaranteed to fit the target type.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/parsing/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"references-intro","title":"First References","concept":"Borrowing for read-only access","summary":"A shared reference lets a function read a value while the caller keeps ownership.","rule":"`&T` borrows `T` for read-only use without transferring ownership.","minutes":11,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/references-intro/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"methods-intro","title":"Using Methods","concept":"Dot syntax and chained transformations","summary":"Method syntax puts an operation beside the value it acts on.","rule":"Read a method's `self` parameter to learn its ownership effect.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/methods-intro/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"recoverable-errors","title":"Handling Failure","concept":"Result without panic","summary":"`Result` keeps expected failure in the function's type instead of turning it into a crash.","rule":"Use `Result` for failure the caller can reasonably respond to.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/recoverable-errors/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"debugging-values","title":"Inspecting Values","concept":"Debug, dbg!, and stderr","summary":"`Debug` output is evidence for development, not part of the program's user-facing result.","rule":"`dbg!` returns its argument and writes diagnostic output to stderr.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/debugging-values/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"small-programs","id":"comments-docs","title":"Comments & Docs","concept":"/// doc comments and examples","summary":"In a library crate, `cargo test` compiles the code examples in doc comments and runs them as tests.","rule":"In a library crate, a doc example is a test, so `cargo test` catches an example that has drifted.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/comments-docs/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"structs","title":"Structs","concept":"Named data and methods","summary":"Structs give related data names and a stable shape.","rule":"`self` consumes, `&self` reads, `&mut self` modifies.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/structs/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"enums","title":"Enums & Match","concept":"Variants and exhaustive handling","summary":"Enums model a value that is exactly one of several variants.","rule":"`match` is exhaustive: every variant must be handled.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/enums/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"option-result","title":"Option & Result","concept":"Explicit absence and failure","summary":"`Option` models absence; `Result` models failure with a reason.","rule":"`Option` for absence, `Result` when the caller needs the reason.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/option-result/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"collections","title":"Collections","concept":"Vec, String, and HashMap","summary":"`Vec`, `String`, and `HashMap` own growable data with different trade-offs.","rule":"`entry().or_insert()` gives you a mutable reference either way.","minutes":14,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/collections/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"strings","title":"Strings & UTF-8","concept":"String, &str, chars, and bytes","summary":"Rust strings are UTF-8, so there is no cheap index by character.","rule":"`len()` counts UTF-8 bytes; `chars().count()` counts Unicode scalar values, not grapheme clusters.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/strings/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"pattern-matching","title":"Pattern Matching","concept":"Destructuring, guards, and bindings","summary":"Patterns destructure data and bind its parts in one step.","rule":"A guard narrows an arm; the compiler still demands the set be exhaustive.","minutes":17,"exerciseKind":"runnable","url":"https://crabrix.com/learn/basics/pattern-matching/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"basics","unitId":"modeling","id":"derive","title":"Derive Macros","concept":"Debug, Clone, PartialEq, and Default","summary":"`derive` writes the obvious implementation so you do not have to.","rule":"`derive` only compiles when every field also implements the trait.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/basics/derive/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.linear-scan.model","title":"Linear Scan: Mental Model","concept":"Visit every element once and stop when the predicate is satisfied.","summary":"Visit every element once and stop when the predicate is satisfied.","rule":"Visit every element once and stop when the predicate is satisfied. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.linear-scan.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.linear-scan.recognize","title":"Linear Scan: When to Use It","concept":"unsorted lookup, validation, first or last matching position","summary":"Recognise the problem shape before choosing Linear Scan.","rule":"Every earlier value has already been checked and is nonnegative. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.linear-scan.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.linear-scan.challenge","title":"Challenge: Linear Scan","concept":"Return the first index whose reading is negative, or -1 when none is negative.","summary":"Return the first index whose reading is negative, or -1 when none is negative.","rule":"Every earlier value has already been checked and is nonnegative. Return the first index whose reading is negative, or -1 when none is negative.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.linear-scan.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.min-max-tracking.model","title":"Min/Max Tracking: Mental Model","concept":"Carry the best value seen so far and update it from each element.","summary":"Carry the best value seen so far and update it from each element.","rule":"Carry the best value seen so far and update it from each element. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.min-max-tracking.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.min-max-tracking.recognize","title":"Min/Max Tracking: When to Use It","concept":"extrema, record highs, cheapest or most expensive observation","summary":"Recognise the problem shape before choosing Min/Max Tracking.","rule":"Zero may lie outside the input and corrupt the reported range. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.min-max-tracking.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.min-max-tracking.challenge","title":"Challenge: Min/Max Tracking","concept":"Return max - min for the sensor readings. Readings are 32-bit signed integers, so the difference can need 64 bits.","summary":"Return max - min for the sensor readings. Readings are 32-bit signed integers, so the difference can need 64 bits.","rule":"Zero may lie outside the input and corrupt the reported range. Return max - min for the sensor readings. Readings are 32-bit signed integers, so the difference can need 64 bits.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.min-max-tracking.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.frequency-counting.model","title":"Frequency Counting: Mental Model","concept":"Turn repeated observations into counts keyed by the observed value.","summary":"Turn repeated observations into counts keyed by the observed value.","rule":"Turn repeated observations into counts keyed by the observed value. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.frequency-counting.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.frequency-counting.recognize","title":"Frequency Counting: When to Use It","concept":"duplicates, histograms, modes, inventory totals","summary":"Recognise the problem shape before choosing Frequency Counting.","rule":"Compare descending count, then ascending value. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.frequency-counting.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.frequency-counting.challenge","title":"Challenge: Frequency Counting","concept":"Return the value that occurs most often; break ties by the smaller value.","summary":"Return the value that occurs most often; break ties by the smaller value.","rule":"Compare descending count, then ascending value. Return the value that occurs most often; break ties by the smaller value.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.frequency-counting.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.running-accumulator.model","title":"Running Accumulator: Mental Model","concept":"Fold a stream into one state such as a sum, product, checksum, or balance.","summary":"Fold a stream into one state such as a sum, product, checksum, or balance.","rule":"Fold a stream into one state such as a sum, product, checksum, or balance. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.running-accumulator.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.running-accumulator.recognize","title":"Running Accumulator: When to Use It","concept":"totals, checksums, balances, stream summaries","summary":"Recognise the problem shape before choosing Running Accumulator.","rule":"Its zero-based index parity. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.running-accumulator.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.running-accumulator.challenge","title":"Challenge: Running Accumulator","concept":"Return the alternating sum a0 - a1 + a2 - a3 and so on.","summary":"Return the alternating sum a0 - a1 + a2 - a3 and so on.","rule":"Its zero-based index parity. Return the alternating sum a0 - a1 + a2 - a3 and so on.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.running-accumulator.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.adjacent-pair-scan.model","title":"Adjacent Pair Scan: Mental Model","concept":"Compare each item with its predecessor while keeping only local context.","summary":"Compare each item with its predecessor while keeping only local context.","rule":"Compare each item with its predecessor while keeping only local context. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.adjacent-pair-scan.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.adjacent-pair-scan.recognize","title":"Adjacent Pair Scan: When to Use It","concept":"trend changes, runs, inversions, boundary detection","summary":"Recognise the problem shape before choosing Adjacent Pair Scan.","rule":"Each position is compared with its immediate predecessor. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.adjacent-pair-scan.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.adjacent-pair-scan.challenge","title":"Challenge: Adjacent Pair Scan","concept":"Count positions where a reading is lower than the reading immediately before it.","summary":"Count positions where a reading is lower than the reading immediately before it.","rule":"Each position is compared with its immediate predecessor. Count positions where a reading is lower than the reading immediately before it.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.adjacent-pair-scan.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.stable-compaction.model","title":"Stable Compaction: Mental Model","concept":"Write kept elements forward so their relative order survives removal.","summary":"Write kept elements forward so their relative order survives removal.","rule":"Write kept elements forward so their relative order survives removal. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.stable-compaction.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.stable-compaction.recognize","title":"Stable Compaction: When to Use It","concept":"remove-in-place, filtering buffers, zero compaction","summary":"Recognise the problem shape before choosing Stable Compaction.","rule":"The end of the already retained prefix. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.stable-compaction.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.stable-compaction.challenge","title":"Challenge: Stable Compaction","concept":"Remove zeros stably and return the kept prefix as comma-separated values.","summary":"Remove zeros stably and return the kept prefix as comma-separated values.","rule":"The end of the already retained prefix. Remove zeros stably and return the kept prefix as comma-separated values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.stable-compaction.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.predicate-partition.model","title":"Predicate Partition: Mental Model","concept":"Maintain a boundary between items that satisfy a predicate and those that do not.","summary":"Maintain a boundary between items that satisfy a predicate and those that do not.","rule":"Maintain a boundary between items that satisfy a predicate and those that do not. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.predicate-partition.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.predicate-partition.recognize","title":"Predicate Partition: When to Use It","concept":"partitioning, preprocessing, quicksort-style boundaries","summary":"Recognise the problem shape before choosing Predicate Partition.","rule":"Every retained prefix value is even. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.predicate-partition.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.predicate-partition.challenge","title":"Challenge: Predicate Partition","concept":"Place even values before odd values and return the boundary index after the evens. Given arranged=[...] instead, return the rearranged values; any order with every even before every odd is accepted.","summary":"Place even values before odd values and return the boundary index after the evens. Given arranged=[...] instead, return the rearranged values; any order with every even before every odd is accepted.","rule":"Every retained prefix value is even. Place even values before odd values and return the boundary index after the evens. Given arranged=[...] instead, return the rearranged values; any order with every even before every odd is accepted.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.predicate-partition.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.boyer-moore-majority.model","title":"Boyer–Moore Majority Vote: Mental Model","concept":"Cancel different values in pairs so a strict majority remains as the candidate.","summary":"Cancel different values in pairs so a strict majority remains as the candidate.","rule":"Cancel different values in pairs so a strict majority remains as the candidate. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.boyer-moore-majority.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.boyer-moore-majority.recognize","title":"Boyer–Moore Majority Vote: When to Use It","concept":"strict-majority detection with constant memory","summary":"Recognise the problem shape before choosing Boyer–Moore Majority Vote.","rule":"Cancellation produces a candidate even when no strict majority exists. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.boyer-moore-majority.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.boyer-moore-majority.challenge","title":"Challenge: Boyer–Moore Majority Vote","concept":"Return the strict majority value; the input guarantees that one exists.","summary":"Return the strict majority value; the input guarantees that one exists.","rule":"Cancellation produces a candidate even when no strict majority exists. Return the strict majority value; the input guarantees that one exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.boyer-moore-majority.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.reservoir-sampling.model","title":"Reservoir Sampling: Mental Model","concept":"Replace a fixed reservoir with decreasing probability while streaming unknown-length input.","summary":"Replace a fixed reservoir with decreasing probability while streaming unknown-length input.","rule":"Replace a fixed reservoir with decreasing probability while streaming unknown-length input. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.reservoir-sampling.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.reservoir-sampling.recognize","title":"Reservoir Sampling: When to Use It","concept":"uniform sampling from streams and files too large for memory","summary":"Recognise the problem shape before choosing Reservoir Sampling.","rule":"When the supplied uniform choice in 0..=i equals i. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.reservoir-sampling.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.reservoir-sampling.challenge","title":"Challenge: Reservoir Sampling","concept":"Parse equally sized values and choices arrays. At zero-based index i, choices[i] is in 0..=i; replace the one-item reservoir exactly when choices[i] == i. Return the selected value, or none for empty arrays.","summary":"Parse equally sized values and choices arrays. At zero-based index i, choices[i] is in 0..=i; replace the one-item reservoir exactly when choices[i] == i. Return the selected value, or none for empty arrays.","rule":"When the supplied uniform choice in 0..=i equals i. Parse equally sized values and choices arrays. At zero-based index i, choices[i] is in 0..=i; replace the one-item reservoir exactly when choices[i] == i. Return the selected value, or none for empty arrays.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.reservoir-sampling.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.floyd-state-cycle.model","title":"Floyd State Cycle Detection: Mental Model","concept":"Advance one state once and another twice; their meeting proves a cycle without a visited set.","summary":"Advance one state once and another twice; their meeting proves a cycle without a visited set.","rule":"Advance one state once and another twice; their meeting proves a cycle without a visited set. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.floyd-state-cycle.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.floyd-state-cycle.recognize","title":"Floyd State Cycle Detection: When to Use It","concept":"repeated state machines, linked transitions, duplicate-by-cycle reductions","summary":"Recognise the problem shape before choosing Floyd State Cycle Detection.","rule":"Equal-speed movement from the head and meeting point finds the cycle entry. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.floyd-state-cycle.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-scans","id":"algorithm.floyd-state-cycle.challenge","title":"Challenge: Floyd State Cycle Detection","concept":"Given next indexes, return the index where the cycle reached from index 0 begins.","summary":"Given next indexes, return the index where the cycle reached from index 0 begins.","rule":"Equal-speed movement from the head and meeting point finds the cycle entry. Given next indexes, return the index where the cycle reached from index 0 begins.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.floyd-state-cycle.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.hash-membership.model","title":"Hash Membership: Mental Model","concept":"Store seen keys so later membership checks are expected constant time.","summary":"Store seen keys so later membership checks are expected constant time.","rule":"Store seen keys so later membership checks are expected constant time. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.hash-membership.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.hash-membership.recognize","title":"Hash Membership: When to Use It","concept":"duplicate detection, visited values, allowlists and denylists","summary":"Recognise the problem shape before choosing Hash Membership.","rule":"The same value was already inserted. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.hash-membership.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.hash-membership.challenge","title":"Challenge: Hash Membership","concept":"Return whether any badge ID occurs more than once.","summary":"Return whether any badge ID occurs more than once.","rule":"The same value was already inserted. Return whether any badge ID occurs more than once.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.hash-membership.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.hash-frequency.model","title":"Hash Frequency Map: Mental Model","concept":"Map each key to its number of occurrences in one pass.","summary":"Map each key to its number of occurrences in one pass.","rule":"Map each key to its number of occurrences in one pass. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.hash-frequency.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.hash-frequency.recognize","title":"Hash Frequency Map: When to Use It","concept":"anagrams, top frequencies, multiset comparison","summary":"Recognise the problem shape before choosing Hash Frequency Map.","rule":"Equal lengths can still have different letter multiplicities. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.hash-frequency.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.hash-frequency.challenge","title":"Challenge: Hash Frequency Map","concept":"Return whether the two lowercase words have identical character counts.","summary":"Return whether the two lowercase words have identical character counts.","rule":"Equal lengths can still have different letter multiplicities. Return whether the two lowercase words have identical character counts.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.hash-frequency.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.complement-lookup.model","title":"Complement Lookup: Mental Model","concept":"For each number, ask whether target - number has already appeared.","summary":"For each number, ask whether target - number has already appeared.","rule":"For each number, ask whether target - number has already appeared. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.complement-lookup.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.complement-lookup.recognize","title":"Complement Lookup: When to Use It","concept":"pair sums, balanced deltas, matching requirements","summary":"Recognise the problem shape before choosing Complement Lookup.","rule":"The same element must not be reused as both operands. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.complement-lookup.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.complement-lookup.challenge","title":"Challenge: Complement Lookup","concept":"Return zero-based indexes i,j of any two distinct positions whose values sum to target. Return -1,-1 if no pair exists; either order of a valid pair is accepted.","summary":"Return zero-based indexes i,j of any two distinct positions whose values sum to target. Return -1,-1 if no pair exists; either order of a valid pair is accepted.","rule":"The same element must not be reused as both operands. Return zero-based indexes i,j of any two distinct positions whose values sum to target. Return -1,-1 if no pair exists; either order of a valid pair is accepted.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.complement-lookup.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.group-by-key.model","title":"Group by Canonical Key: Mental Model","concept":"Transform each item to a stable key and collect items sharing that key.","summary":"Transform each item to a stable key and collect items sharing that key.","rule":"Transform each item to a stable key and collect items sharing that key. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.group-by-key.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.group-by-key.recognize","title":"Group by Canonical Key: When to Use It","concept":"anagram groups, bucketing records, equivalence classes","summary":"Recognise the problem shape before choosing Group by Canonical Key.","rule":"Anagrams have the same sorted multiset of letters. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.group-by-key.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.group-by-key.challenge","title":"Challenge: Group by Canonical Key","concept":"Group words by sorted letters and return the size of the largest group.","summary":"Group words by sorted letters and return the size of the largest group.","rule":"Anagrams have the same sorted multiset of letters. Group words by sorted letters and return the size of the largest group.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.group-by-key.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.index-map.model","title":"Value-to-Index Map: Mental Model","concept":"Remember the latest position of each value and measure each repeat against it.","summary":"Remember the latest position of each value and measure each repeat against it.","rule":"Remember the latest position of each value and measure each repeat against it. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.index-map.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.index-map.recognize","title":"Value-to-Index Map: When to Use It","concept":"distance between repeats, sparse lookup, reconciliation","summary":"Recognise the problem shape before choosing Value-to-Index Map.","rule":"The latest equal predecessor gives the shortest new distance. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.index-map.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.index-map.challenge","title":"Challenge: Value-to-Index Map","concept":"Return the shortest distance between two equal values, or -1 when no value repeats.","summary":"Return the shortest distance between two equal values, or -1 when no value repeats.","rule":"The latest equal predecessor gives the shortest new distance. Return the shortest distance between two equal values, or -1 when no value repeats.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.index-map.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.coordinate-compression.model","title":"Coordinate Compression: Mental Model","concept":"Replace large ordered values with dense ranks while preserving comparisons.","summary":"Replace large ordered values with dense ranks while preserving comparisons.","rule":"Replace large ordered values with dense ranks while preserving comparisons. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.coordinate-compression.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.coordinate-compression.recognize","title":"Coordinate Compression: When to Use It","concept":"Fenwick indexes, sweep lines, sparse coordinates","summary":"Recognise the problem shape before choosing Coordinate Compression.","rule":"Equality and relative numerical order. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.coordinate-compression.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.coordinate-compression.challenge","title":"Challenge: Coordinate Compression","concept":"Return dense zero-based ranks for the values in original order.","summary":"Return dense zero-based ranks for the values in original order.","rule":"Equality and relative numerical order. Return dense zero-based ranks for the values in original order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.coordinate-compression.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.longest-consecutive-set.model","title":"Longest Consecutive Set Run: Mental Model","concept":"Start only at values with no predecessor, then walk each consecutive run once.","summary":"Start only at values with no predecessor, then walk each consecutive run once.","rule":"Start only at values with no predecessor, then walk each consecutive run once. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.longest-consecutive-set.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.longest-consecutive-set.recognize","title":"Longest Consecutive Set Run: When to Use It","concept":"unsorted consecutive sequences and sparse integer runs","summary":"Recognise the problem shape before choosing Longest Consecutive Set Run.","rule":"Each run is traversed once from its smallest value. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.longest-consecutive-set.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.longest-consecutive-set.challenge","title":"Challenge: Longest Consecutive Set Run","concept":"Return the length of the longest run of consecutive integer values; duplicates count once.","summary":"Return the length of the longest run of consecutive integer values; duplicates count once.","rule":"Each run is traversed once from its smallest value. Return the length of the longest run of consecutive integer values; duplicates count once.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.longest-consecutive-set.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.bidirectional-map.model","title":"Bidirectional Mapping: Mental Model","concept":"Maintain both key-to-value and value-to-key constraints to enforce a bijection.","summary":"Maintain both key-to-value and value-to-key constraints to enforce a bijection.","rule":"Maintain both key-to-value and value-to-key constraints to enforce a bijection. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bidirectional-map.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.bidirectional-map.recognize","title":"Bidirectional Mapping: When to Use It","concept":"isomorphism, renaming, one-to-one assignments","summary":"Recognise the problem shape before choosing Bidirectional Mapping.","rule":"Different letters must not map to the same word. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bidirectional-map.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.bidirectional-map.challenge","title":"Challenge: Bidirectional Mapping","concept":"Return whether pattern letters map one-to-one onto the words.","summary":"Return whether pattern letters map one-to-one onto the words.","rule":"Different letters must not map to the same word. Return whether pattern letters map one-to-one onto the words.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bidirectional-map.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.randomized-set.model","title":"Indexed Randomized Set: Mental Model","concept":"Combine a dense vector with a value-to-index map; delete by swapping with the last item.","summary":"Combine a dense vector with a value-to-index map; delete by swapping with the last item.","rule":"Combine a dense vector with a value-to-index map; delete by swapping with the last item. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.randomized-set.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.randomized-set.recognize","title":"Indexed Randomized Set: When to Use It","concept":"O(1) insert, delete, and random access","summary":"Recognise the problem shape before choosing Indexed Randomized Set.","rule":"The last value now occupies the removed slot. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.randomized-set.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.randomized-set.challenge","title":"Challenge: Indexed Randomized Set","concept":"Tokens addN and removeN arrive separated by spaces. Adding a value already present and removing an absent value change nothing. Apply them to dense vector storage, then return the remaining values sorted ascending, or an empty string when nothing remains.","summary":"Tokens addN and removeN arrive separated by spaces. Adding a value already present and removing an absent value change nothing. Apply them to dense vector storage, then return the remaining values sorted ascending, or an empty string when nothing remains.","rule":"The last value now occupies the removed slot. Tokens addN and removeN arrive separated by spaces. Adding a value already present and removing an absent value change nothing. Apply them to dense vector storage, then return the remaining values sorted ascending, or an empty string when nothing remains.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.randomized-set.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.rolling-fingerprint.model","title":"Rolling Fingerprint: Mental Model","concept":"Update a window hash by removing the outgoing contribution and adding the incoming one.","summary":"Update a window hash by removing the outgoing contribution and adding the incoming one.","rule":"Update a window hash by removing the outgoing contribution and adding the incoming one. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-fingerprint.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.rolling-fingerprint.recognize","title":"Rolling Fingerprint: When to Use It","concept":"substring search, duplicate blocks, content fingerprints","summary":"Recognise the problem shape before choosing Rolling Fingerprint.","rule":"Different digit sequences can have equal remainders. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-fingerprint.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-hashing","id":"algorithm.rolling-fingerprint.challenge","title":"Challenge: Rolling Fingerprint","concept":"Parse digits in 0..9; leading zeros are allowed. Keep a window of the last three digits, or fewer before three have arrived. Maintain hash=(hash*10+digit)%101 for the window, removing the outgoing digit's contribution, and return the final window's hash.","summary":"Parse digits in 0..9; leading zeros are allowed. Keep a window of the last three digits, or fewer before three have arrived. Maintain hash=(hash*10+digit)%101 for the window, removing the outgoing digit's contribution, and return the final window's hash.","rule":"Different digit sequences can have equal remainders. Parse digits in 0..9; leading zeros are allowed. Keep a window of the last three digits, or fewer before three have arrived. Maintain hash=(hash*10+digit)%101 for the window, removing the outgoing digit's contribution, and return the final window's hash.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-fingerprint.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-sum.model","title":"Prefix Sum: Mental Model","concept":"Store the sum before every boundary so a range is one subtraction.","summary":"Store the sum before every boundary so a range is one subtraction.","rule":"Store the sum before every boundary so a range is one subtraction. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-sum.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-sum.recognize","title":"Prefix Sum: When to Use It","concept":"immutable range sums, cumulative totals, balance points","summary":"Recognise the problem shape before choosing Prefix Sum.","rule":"prefix[4] minus prefix[1]. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-sum.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-sum.challenge","title":"Challenge: Prefix Sum","concept":"Return the sum of inclusive indexes 1 through 3; input contains at least four integers.","summary":"Return the sum of inclusive indexes 1 through 3; input contains at least four integers.","rule":"prefix[4] minus prefix[1]. Return the sum of inclusive indexes 1 through 3; input contains at least four integers.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-sum.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.suffix-aggregate.model","title":"Suffix Aggregate: Mental Model","concept":"Precompute information from right to left for queries about everything after a position.","summary":"Precompute information from right to left for queries about everything after a position.","rule":"Precompute information from right to left for queries about everything after a position. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-aggregate.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.suffix-aggregate.recognize","title":"Suffix Aggregate: When to Use It","concept":"right-side maxima, suffix totals, partition checks","summary":"Recognise the problem shape before choosing Suffix Aggregate.","rule":"The next suffix maximum is already available. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-aggregate.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.suffix-aggregate.challenge","title":"Challenge: Suffix Aggregate","concept":"Return the suffix maximum at every index.","summary":"Return the suffix maximum at every index.","rule":"The next suffix maximum is already available. Return the suffix maximum at every index.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-aggregate.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.equilibrium-index.model","title":"Prefix/Suffix Balance: Mental Model","concept":"Compare cumulative left state with total-minus-current-minus-left state.","summary":"Compare cumulative left state with total-minus-current-minus-left state.","rule":"Compare cumulative left state with total-minus-current-minus-left state. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.equilibrium-index.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.equilibrium-index.recognize","title":"Prefix/Suffix Balance: When to Use It","concept":"pivot indexes, balanced partitions, equal-load cuts","summary":"Recognise the problem shape before choosing Prefix/Suffix Balance.","rule":"Left and right refer to elements strictly before and after the index. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.equilibrium-index.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.equilibrium-index.challenge","title":"Challenge: Prefix/Suffix Balance","concept":"Return the first index whose strict left and right sums match, or -1 when no such index exists.","summary":"Return the first index whose strict left and right sums match, or -1 when no such index exists.","rule":"Left and right refer to elements strictly before and after the index. Return the first index whose strict left and right sums match, or -1 when no such index exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.equilibrium-index.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.difference-array.model","title":"Difference Array: Mental Model","concept":"Mark only where a range update starts and stops, then integrate once.","summary":"Mark only where a range update starts and stops, then integrate once.","rule":"Mark only where a range update starts and stops, then integrate once. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.difference-array.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.difference-array.recognize","title":"Difference Array: When to Use It","concept":"many offline range additions and schedule deltas","summary":"Recognise the problem shape before choosing Difference Array.","rule":"At R+1. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.difference-array.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.difference-array.challenge","title":"Challenge: Difference Array","concept":"Parse n and inclusive (l,r,delta) updates on a zero-filled array of length n; delta may be negative. Apply every update and return the final array.","summary":"Parse n and inclusive (l,r,delta) updates on a zero-filled array of length n; delta may be negative. Apply every update and return the final array.","rule":"At R+1. Parse n and inclusive (l,r,delta) updates on a zero-filled array of length n; delta may be negative. Apply every update and return the final array.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.difference-array.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-suffix-product.model","title":"Prefix/Suffix Product: Mental Model","concept":"Combine the product before and after each index without division.","summary":"Combine the product before and after each index without division.","rule":"Combine the product before and after each index without division. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-suffix-product.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-suffix-product.recognize","title":"Prefix/Suffix Product: When to Use It","concept":"product-except-self and exclusion aggregates","summary":"Recognise the problem shape before choosing Prefix/Suffix Product.","rule":"The method remains valid when an input contains zero. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-suffix-product.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-suffix-product.challenge","title":"Challenge: Prefix/Suffix Product","concept":"Return the product of all values except the one at each position.","summary":"Return the product of all values except the one at each position.","rule":"The method remains valid when an input contains zero. Return the product of all values except the one at each position.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-suffix-product.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-xor.model","title":"Prefix XOR: Mental Model","concept":"Use XOR self-cancellation so a range value is two prefix states combined.","summary":"Use XOR self-cancellation so a range value is two prefix states combined.","rule":"Use XOR self-cancellation so a range value is two prefix states combined. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-xor.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-xor.recognize","title":"Prefix XOR: When to Use It","concept":"range XOR, parity masks, repeated-state detection","summary":"Recognise the problem shape before choosing Prefix XOR.","rule":"Each repeated bit pattern cancels because x XOR x is zero. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-xor.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-xor.challenge","title":"Challenge: Prefix XOR","concept":"Return XOR of inclusive indexes 1 through 4; input contains at least five integers.","summary":"Return XOR of inclusive indexes 1 through 4; input contains at least five integers.","rule":"Each repeated bit pattern cancels because x XOR x is zero. Return XOR of inclusive indexes 1 through 4; input contains at least five integers.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-xor.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-sum-2d.model","title":"2D Prefix Sum: Mental Model","concept":"Store each rectangle from the origin and use inclusion-exclusion for any subrectangle.","summary":"Store each rectangle from the origin and use inclusion-exclusion for any subrectangle.","rule":"Store each rectangle from the origin and use inclusion-exclusion for any subrectangle. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-sum-2d.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-sum-2d.recognize","title":"2D Prefix Sum: When to Use It","concept":"image regions, matrix queries, grid density","summary":"Recognise the problem shape before choosing 2D Prefix Sum.","rule":"The two subtractions removed that overlap twice. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-sum-2d.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.prefix-sum-2d.challenge","title":"Challenge: 2D Prefix Sum","concept":"Return the sum of inclusive rows 1..2 and columns 0..1 of a rectangular matrix with at least three rows and two columns.","summary":"Return the sum of inclusive rows 1..2 and columns 0..1 of a rectangular matrix with at least three rows and two columns.","rule":"The two subtractions removed that overlap twice. Return the sum of inclusive rows 1..2 and columns 0..1 of a rectangular matrix with at least three rows and two columns.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.prefix-sum-2d.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.imos-sweep.model","title":"Imos Sweep: Mental Model","concept":"Record interval starts and ends, then sweep a running active count.","summary":"Record interval starts and ends, then sweep a running active count.","rule":"Record interval starts and ends, then sweep a running active count. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.imos-sweep.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.imos-sweep.recognize","title":"Imos Sweep: When to Use It","concept":"coverage, bookings, overlapping demand","summary":"Recognise the problem shape before choosing Imos Sweep.","rule":"The load at R still belongs to the interval. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.imos-sweep.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.imos-sweep.challenge","title":"Challenge: Imos Sweep","concept":"Parse n and inclusive (start,end,delta) updates with nonnegative loads. Return the maximum simultaneous load over indexes 0..n-1. Add at start and subtract at end+1.","summary":"Parse n and inclusive (start,end,delta) updates with nonnegative loads. Return the maximum simultaneous load over indexes 0..n-1. Add at start and subtract at end+1.","rule":"The load at R still belongs to the interval. Parse n and inclusive (start,end,delta) updates with nonnegative loads. Return the maximum simultaneous load over indexes 0..n-1. Add at start and subtract at end+1.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.imos-sweep.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.fenwick-tree.model","title":"Fenwick Tree: Mental Model","concept":"Store partial sums in power-of-two ranges and move indexes by their lowest set bit.","summary":"Store partial sums in power-of-two ranges and move indexes by their lowest set bit.","rule":"Store partial sums in power-of-two ranges and move indexes by their lowest set bit. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.fenwick-tree.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.fenwick-tree.recognize","title":"Fenwick Tree: When to Use It","concept":"dynamic prefix sums, frequency tables, inversion counts","summary":"Recognise the problem shape before choosing Fenwick Tree.","rule":"The size of the node's lowest-set-bit range. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.fenwick-tree.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.fenwick-tree.challenge","title":"Challenge: Fenwick Tree","concept":"Apply the 1-indexed add operations and return the prefix sum through query.","summary":"Apply the 1-indexed add operations and return the prefix sum through query.","rule":"The size of the node's lowest-set-bit range. Apply the 1-indexed add operations and return the prefix sum through query.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.fenwick-tree.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.segment-tree.model","title":"Segment Tree: Mental Model","concept":"Represent intervals as a binary tree so a query visits only canonical covering nodes.","summary":"Represent intervals as a binary tree so a query visits only canonical covering nodes.","rule":"Represent intervals as a binary tree so a query visits only canonical covering nodes. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.segment-tree.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.segment-tree.recognize","title":"Segment Tree: When to Use It","concept":"dynamic range min/max/sum and interval aggregation","summary":"Recognise the problem shape before choosing Segment Tree.","rule":"Their disjoint canonical intervals cover the requested range. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.segment-tree.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-ranges","id":"algorithm.segment-tree.challenge","title":"Challenge: Segment Tree","concept":"Build range minimum, apply the point update, then query the inclusive range.","summary":"Build range minimum, apply the point update, then query the inclusive range.","rule":"Their disjoint canonical intervals cover the requested range. Build range minimum, apply the point update, then query the inclusive range.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.segment-tree.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.opposite-ends.model","title":"Opposite-End Pointers: Mental Model","concept":"Move inward from both ends when ordering tells which side cannot improve.","summary":"Move inward from both ends when ordering tells which side cannot improve.","rule":"Move inward from both ends when ordering tells which side cannot improve. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.opposite-ends.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.opposite-ends.recognize","title":"Opposite-End Pointers: When to Use It","concept":"sorted pairs, symmetry, boundary comparisons","summary":"Recognise the problem shape before choosing Opposite-End Pointers.","rule":"Keeping the same left value and a smaller right value cannot increase the sum. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.opposite-ends.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.opposite-ends.challenge","title":"Challenge: Opposite-End Pointers","concept":"Return whether two different positions of the sorted values sum to 10.","summary":"Return whether two different positions of the sorted values sum to 10.","rule":"Keeping the same left value and a smaller right value cannot increase the sum. Return whether two different positions of the sorted values sum to 10.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.opposite-ends.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.same-direction.model","title":"Same-Direction Pointers: Mental Model","concept":"Let a read pointer inspect every item while a write pointer marks the kept prefix.","summary":"Let a read pointer inspect every item while a write pointer marks the kept prefix.","rule":"Let a read pointer inspect every item while a write pointer marks the kept prefix. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.same-direction.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.same-direction.recognize","title":"Same-Direction Pointers: When to Use It","concept":"stable filtering, deduplication, in-place transforms","summary":"Recognise the problem shape before choosing Same-Direction Pointers.","rule":"The write position never advances beyond the read position. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.same-direction.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.same-direction.challenge","title":"Challenge: Same-Direction Pointers","concept":"Remove values below 5 stably and return the kept prefix.","summary":"Remove values below 5 stably and return the kept prefix.","rule":"The write position never advances beyond the read position. Remove values below 5 stably and return the kept prefix.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.same-direction.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.slow-fast.model","title":"Slow/Fast Pointers: Mental Model","concept":"Advance pointers at different rates so relative motion reveals a midpoint or cycle.","summary":"Advance pointers at different rates so relative motion reveals a midpoint or cycle.","rule":"Advance pointers at different rates so relative motion reveals a midpoint or cycle. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.slow-fast.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.slow-fast.recognize","title":"Slow/Fast Pointers: When to Use It","concept":"linked-list middle, cycle detection, repeated transitions","summary":"Recognise the problem shape before choosing Slow/Fast Pointers.","rule":"Each pair of consumed elements advances the middle one position. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.slow-fast.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.slow-fast.challenge","title":"Challenge: Slow/Fast Pointers","concept":"Return the middle value; for even length choose the second middle.","summary":"Return the middle value; for even length choose the second middle.","rule":"Each pair of consumed elements advances the middle one position. Return the middle value; for even length choose the second middle.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.slow-fast.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.sorted-two-sum.model","title":"Sorted Two-Sum: Mental Model","concept":"Compare the end-pair sum with the target and discard one impossible endpoint.","summary":"Compare the end-pair sum with the target and discard one impossible endpoint.","rule":"Compare the end-pair sum with the target and discard one impossible endpoint. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sorted-two-sum.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.sorted-two-sum.recognize","title":"Sorted Two-Sum: When to Use It","concept":"one pair in sorted numeric data","summary":"Recognise the problem shape before choosing Sorted Two-Sum.","rule":"The output contract uses one-based indexes. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sorted-two-sum.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.sorted-two-sum.challenge","title":"Challenge: Sorted Two-Sum","concept":"For sorted values, return one-based indexes of any two distinct positions summing to 17. Return -1,-1 if no pair exists.","summary":"For sorted values, return one-based indexes of any two distinct positions summing to 17. Return -1,-1 if no pair exists.","rule":"The output contract uses one-based indexes. For sorted values, return one-based indexes of any two distinct positions summing to 17. Return -1,-1 if no pair exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.sorted-two-sum.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.palindrome-pointers.model","title":"Palindrome Pointers: Mental Model","concept":"Compare normalized symbols from the outside inward and skip irrelevant input.","summary":"Compare normalized symbols from the outside inward and skip irrelevant input.","rule":"Compare normalized symbols from the outside inward and skip irrelevant input. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.palindrome-pointers.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.palindrome-pointers.recognize","title":"Palindrome Pointers: When to Use It","concept":"palindrome validation and mirrored constraints","summary":"Recognise the problem shape before choosing Palindrome Pointers.","rule":"When it is non-alphanumeric under the stated ASCII normalization. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.palindrome-pointers.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.palindrome-pointers.challenge","title":"Challenge: Palindrome Pointers","concept":"Ignore punctuation and case; return whether the text is a palindrome.","summary":"Ignore punctuation and case; return whether the text is a palindrome.","rule":"When it is non-alphanumeric under the stated ASCII normalization. Ignore punctuation and case; return whether the text is a palindrome.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.palindrome-pointers.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.three-sum.model","title":"Three-Sum Reduction: Mental Model","concept":"Sort, fix one value, and solve the remaining target with two pointers while skipping duplicates.","summary":"Sort, fix one value, and solve the remaining target with two pointers while skipping duplicates.","rule":"Sort, fix one value, and solve the remaining target with two pointers while skipping duplicates. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.three-sum.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.three-sum.recognize","title":"Three-Sum Reduction: When to Use It","concept":"unique triples and k-sum reductions","summary":"Recognise the problem shape before choosing Three-Sum Reduction.","rule":"The result counts unique value triples, not index combinations. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.three-sum.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.three-sum.challenge","title":"Challenge: Three-Sum Reduction","concept":"Return the number of unique value triples summing to zero; triples with the same values count once.","summary":"Return the number of unique value triples summing to zero; triples with the same values count once.","rule":"The result counts unique value triples, not index combinations. Return the number of unique value triples summing to zero; triples with the same values count once.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.three-sum.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.dutch-flag.model","title":"Dutch National Flag: Mental Model","concept":"Maintain less-than, equal, unknown, and greater-than regions with three boundaries.","summary":"Maintain less-than, equal, unknown, and greater-than regions with three boundaries.","rule":"Maintain less-than, equal, unknown, and greater-than regions with three boundaries. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dutch-flag.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.dutch-flag.recognize","title":"Dutch National Flag: When to Use It","concept":"three-way partitioning and duplicate-heavy quicksort","summary":"Recognise the problem shape before choosing Dutch National Flag.","rule":"The value arriving at scan has not yet been classified. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dutch-flag.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.dutch-flag.challenge","title":"Challenge: Dutch National Flag","concept":"Sort values containing only 0, 1, and 2 in place.","summary":"Sort values containing only 0, 1, and 2 in place.","rule":"The value arriving at scan has not yet been classified. Sort values containing only 0, 1, and 2 in place.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dutch-flag.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.container-area.model","title":"Container Area: Mental Model","concept":"The shorter boundary limits area, so only moving that boundary can improve the result.","summary":"The shorter boundary limits area, so only moving that boundary can improve the result.","rule":"Start with the widest pair and move one boundary inward after each area check. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.container-area.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.container-area.recognize","title":"Container Area: When to Use It","concept":"max area between ordered boundaries","summary":"Recognise the problem shape before choosing Container Area.","rule":"The shorter height limits area and a narrower pair with it cannot improve. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.container-area.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.container-area.challenge","title":"Challenge: Container Area","concept":"Each value is a wall height at its index. Walls i<j hold area (j-i)*min(height[i],height[j]). Return the greatest area.","summary":"Each value is a wall height at its index. Walls i<j hold area (j-i)*min(height[i],height[j]). Return the greatest area.","rule":"The shorter height limits area and a narrower pair with it cannot improve. Each value is a wall height at its index. Walls i<j hold area (j-i)*min(height[i],height[j]). Return the greatest area.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.container-area.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.in-place-merge.model","title":"Backward In-Place Merge: Mental Model","concept":"Fill free capacity from the end so unread source values are never overwritten.","summary":"Fill free capacity from the end so unread source values are never overwritten.","rule":"Fill free capacity from the end, taking the larger of the two unread tails. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.in-place-merge.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.in-place-merge.recognize","title":"Backward In-Place Merge: When to Use It","concept":"merging sorted buffers with trailing capacity","summary":"Recognise the problem shape before choosing Backward In-Place Merge.","rule":"The free suffix prevents overwriting unread values from the first list. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.in-place-merge.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.in-place-merge.challenge","title":"Challenge: Backward In-Place Merge","concept":"Parse a, whose first m entries are sorted live values and whose remainder is free capacity, and sorted b. Merge b into a and return all values. Live values may be zero.","summary":"Parse a, whose first m entries are sorted live values and whose remainder is free capacity, and sorted b. Merge b into a and return all values. Live values may be zero.","rule":"The free suffix prevents overwriting unread values from the first list. Parse a, whose first m entries are sorted live values and whose remainder is free capacity, and sorted b. Merge b into a and return all values. Live values may be zero.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.in-place-merge.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.trapping-water.model","title":"Two-Pointer Rainwater: Mental Model","concept":"The smaller side has a settled bound; accumulate its deficit before moving inward.","summary":"The smaller side has a settled bound; accumulate its deficit before moving inward.","rule":"The smaller side has a settled bound; accumulate its deficit before moving inward. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.trapping-water.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.trapping-water.recognize","title":"Two-Pointer Rainwater: When to Use It","concept":"water trapping and dual-boundary accumulation","summary":"Recognise the problem shape before choosing Two-Pointer Rainwater.","rule":"The opposite settled boundary is already at least as high. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.trapping-water.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-two-pointers","id":"algorithm.trapping-water.challenge","title":"Challenge: Two-Pointer Rainwater","concept":"Return total trapped units between bars.","summary":"Return total trapped units between bars.","rule":"The opposite settled boundary is already at least as high. Return total trapped units between bars.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.trapping-water.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.fixed-window.model","title":"Fixed-Size Window: Mental Model","concept":"Add the entering item and remove the leaving item instead of recomputing each range.","summary":"Add the entering item and remove the leaving item instead of recomputing each range.","rule":"Add the entering item and remove the leaving item instead of recomputing each range. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.fixed-window.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.fixed-window.recognize","title":"Fixed-Size Window: When to Use It","concept":"fixed-length sums, averages, local scores","summary":"Recognise the problem shape before choosing Fixed-Size Window.","rule":"The state must describe exactly k adjacent elements. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.fixed-window.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.fixed-window.challenge","title":"Challenge: Fixed-Size Window","concept":"Return the greatest sum of any three adjacent values; values may be negative.","summary":"Return the greatest sum of any three adjacent values; values may be negative.","rule":"The state must describe exactly k adjacent elements. Return the greatest sum of any three adjacent values; values may be negative.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.fixed-window.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.variable-window.model","title":"Variable-Size Window: Mental Model","concept":"Expand until the sum reaches the target, then shrink from the left while it stays at or above the target.","summary":"Expand until the sum reaches the target, then shrink from the left while it stays at or above the target.","rule":"Expand until the sum reaches the target, then shrink from the left while it stays at or above the target. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.variable-window.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.variable-window.recognize","title":"Variable-Size Window: When to Use It","concept":"minimum or maximum contiguous ranges under a monotone constraint","summary":"Recognise the problem shape before choosing Variable-Size Window.","rule":"All values are positive. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.variable-window.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.variable-window.challenge","title":"Challenge: Variable-Size Window","concept":"For positive values, return the minimum length of a contiguous subarray with sum at least 7, or 0 when no such subarray exists.","summary":"For positive values, return the minimum length of a contiguous subarray with sum at least 7, or 0 when no such subarray exists.","rule":"All values are positive. For positive values, return the minimum length of a contiguous subarray with sum at least 7, or 0 when no such subarray exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.variable-window.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.unique-window.model","title":"Last-Seen Unique Window: Mental Model","concept":"Jump the left boundary past a repeated symbol using its latest position.","summary":"Jump the left boundary past a repeated symbol using its latest position.","rule":"Jump the left boundary past a repeated symbol using its latest position. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.unique-window.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.unique-window.recognize","title":"Last-Seen Unique Window: When to Use It","concept":"longest substring or subarray with unique items","summary":"Recognise the problem shape before choosing Last-Seen Unique Window.","rule":"An old occurrence outside the current window must not move left backward. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.unique-window.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.unique-window.challenge","title":"Challenge: Last-Seen Unique Window","concept":"Return the longest substring length without repeated characters.","summary":"Return the longest substring length without repeated characters.","rule":"An old occurrence outside the current window must not move left backward. Return the longest substring length without repeated characters.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.unique-window.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.at-most-k.model","title":"At-Most-K Window: Mental Model","concept":"Keep a frequency state and shrink while more than k distinct values are present.","summary":"Keep a frequency state and shrink while more than k distinct values are present.","rule":"Keep a frequency state for the window, grow it on the right, and record the best valid length. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.at-most-k.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.at-most-k.recognize","title":"At-Most-K Window: When to Use It","concept":"longest range with bounded distinct items","summary":"Recognise the problem shape before choosing At-Most-K Window.","rule":"While the number of positive-frequency keys exceeds k. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.at-most-k.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.at-most-k.challenge","title":"Challenge: At-Most-K Window","concept":"Return the longest subarray containing at most two distinct values.","summary":"Return the longest subarray containing at most two distinct values.","rule":"While the number of positive-frequency keys exceeds k. Return the longest subarray containing at most two distinct values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.at-most-k.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.exactly-k-difference.model","title":"Exactly-K by Difference: Mental Model","concept":"Count windows with at most k and subtract those with at most k-1.","summary":"Count windows with at most k and subtract those with at most k-1.","rule":"Count windows with at most k and subtract those with at most k-1. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.exactly-k-difference.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.exactly-k-difference.recognize","title":"Exactly-K by Difference: When to Use It","concept":"exact distinct counts and exact bounded properties","summary":"Recognise the problem shape before choosing Exactly-K by Difference.","rule":"The difference removes every window with fewer than k distinct values. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.exactly-k-difference.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.exactly-k-difference.challenge","title":"Challenge: Exactly-K by Difference","concept":"Return the number of subarrays with exactly two distinct values.","summary":"Return the number of subarrays with exactly two distinct values.","rule":"The difference removes every window with fewer than k distinct values. Return the number of subarrays with exactly two distinct values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.exactly-k-difference.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.frequency-balanced-window.model","title":"Frequency-Balanced Window: Mental Model","concept":"Track the dominant count so replacements needed equal window length minus that count.","summary":"Track the dominant count so replacements needed equal window length minus that count.","rule":"Track the dominant character count and shrink the window once it needs more replacements than allowed. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.frequency-balanced-window.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.frequency-balanced-window.recognize","title":"Frequency-Balanced Window: When to Use It","concept":"character replacement and bounded edits","summary":"Recognise the problem shape before choosing Frequency-Balanced Window.","rule":"Window length minus its largest character frequency. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.frequency-balanced-window.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.frequency-balanced-window.challenge","title":"Challenge: Frequency-Balanced Window","concept":"With at most one replacement, return the longest equal-character substring length.","summary":"With at most one replacement, return the longest equal-character substring length.","rule":"Window length minus its largest character frequency. With at most one replacement, return the longest equal-character substring length.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.frequency-balanced-window.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.minimum-cover-window.model","title":"Minimum Cover Window: Mental Model","concept":"Expand until all required multiplicities are covered, then shrink while coverage remains.","summary":"Expand until all required multiplicities are covered, then shrink while coverage remains.","rule":"Expand until all required multiplicities are covered, then shrink while coverage remains. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.minimum-cover-window.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.minimum-cover-window.recognize","title":"Minimum Cover Window: When to Use It","concept":"smallest substring or range containing a multiset","summary":"Recognise the problem shape before choosing Minimum Cover Window.","rule":"Repeated required symbols must each be covered. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.minimum-cover-window.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.minimum-cover-window.challenge","title":"Challenge: Minimum Cover Window","concept":"For ASCII text, return the shortest substring covering A, B and C; choose the earliest if lengths tie, or the empty string if no cover exists.","summary":"For ASCII text, return the shortest substring covering A, B and C; choose the earliest if lengths tie, or the empty string if no cover exists.","rule":"Repeated required symbols must each be covered. For ASCII text, return the shortest substring covering A, B and C; choose the earliest if lengths tie, or the empty string if no cover exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.minimum-cover-window.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.monotonic-deque-window.model","title":"Monotonic Deque Window: Mental Model","concept":"Keep candidate indexes in decreasing value order and evict those outside the window.","summary":"Keep candidate indexes in decreasing value order and evict those outside the window.","rule":"Keep candidate indexes in decreasing value order and evict those outside the window. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-deque-window.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.monotonic-deque-window.recognize","title":"Monotonic Deque Window: When to Use It","concept":"sliding maximum or minimum","summary":"Recognise the problem shape before choosing Monotonic Deque Window.","rule":"Indexes tell when a candidate expires from the window. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-deque-window.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.monotonic-deque-window.challenge","title":"Challenge: Monotonic Deque Window","concept":"Return maxima for every window of length three.","summary":"Return maxima for every window of length three.","rule":"Indexes tell when a candidate expires from the window. Return maxima for every window of length three.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-deque-window.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.rolling-window-statistic.model","title":"Rolling Mean and Variance: Mental Model","concept":"Update sufficient statistics as samples enter and leave rather than retaining every computation.","summary":"Update sufficient statistics as samples enter and leave rather than retaining every computation.","rule":"Update sufficient statistics as samples enter and leave rather than retaining every computation. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-window-statistic.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.rolling-window-statistic.recognize","title":"Rolling Mean and Variance: When to Use It","concept":"telemetry, anomaly windows, streaming statistics","summary":"Recognise the problem shape before choosing Rolling Mean and Variance.","rule":"Rounding each update would accumulate error. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-window-statistic.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.rolling-window-statistic.challenge","title":"Challenge: Rolling Mean and Variance","concept":"For each window of length three, return the mean rounded down, toward negative infinity. For input written variance=[...], return each window's population variance rounded down instead.","summary":"For each window of length three, return the mean rounded down, toward negative infinity. For input written variance=[...], return each window's population variance rounded down instead.","rule":"Rounding each update would accumulate error. For each window of length three, return the mean rounded down, toward negative infinity. For input written variance=[...], return each window's population variance rounded down instead.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-window-statistic.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.dual-heap-window-median.model","title":"Sliding Median with Two Heaps: Mental Model","concept":"Balance lower and upper heaps while lazily deleting values that leave the window.","summary":"Balance lower and upper heaps while lazily deleting values that leave the window.","rule":"Balance lower and upper heaps while lazily deleting values that leave the window. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dual-heap-window-median.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.dual-heap-window-median.recognize","title":"Sliding Median with Two Heaps: When to Use It","concept":"window medians and percentile-like statistics","summary":"Recognise the problem shape before choosing Sliding Median with Two Heaps.","rule":"Buried expired entries can otherwise grow beyond O(k) space. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dual-heap-window-median.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sliding-window","id":"algorithm.dual-heap-window-median.challenge","title":"Challenge: Sliding Median with Two Heaps","concept":"Return medians for every odd window of length three.","summary":"Return medians for every odd window of length three.","rule":"Buried expired entries can otherwise grow beyond O(k) space. Return medians for every odd window of length three.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dual-heap-window-median.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.delimiter-stack.model","title":"Delimiter Stack: Mental Model","concept":"Push open delimiters and require every close to match the most recent open.","summary":"Push open delimiters and require every close to match the most recent open.","rule":"Push open delimiters and require every close to match the most recent open. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.delimiter-stack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.delimiter-stack.recognize","title":"Delimiter Stack: When to Use It","concept":"nested syntax, parsers, balanced scopes","summary":"Recognise the problem shape before choosing Delimiter Stack.","rule":"Nested delimiters close in last-in-first-out order. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.delimiter-stack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.delimiter-stack.challenge","title":"Challenge: Delimiter Stack","concept":"Return whether the delimiters are correctly nested.","summary":"Return whether the delimiters are correctly nested.","rule":"Nested delimiters close in last-in-first-out order. Return whether the delimiters are correctly nested.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.delimiter-stack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.postfix-evaluation.model","title":"Postfix Evaluation: Mental Model","concept":"Push operands and reduce the latest operands whenever an operator arrives.","summary":"Push operands and reduce the latest operands whenever an operator arrives.","rule":"Push operands and reduce the latest operands whenever an operator arrives. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.postfix-evaluation.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.postfix-evaluation.recognize","title":"Postfix Evaluation: When to Use It","concept":"expression evaluators and stack machines","summary":"Recognise the problem shape before choosing Postfix Evaluation.","rule":"Operand order matters for subtraction and division. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.postfix-evaluation.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.postfix-evaluation.challenge","title":"Challenge: Postfix Evaluation","concept":"Evaluate the space-separated postfix expression.","summary":"Evaluate the space-separated postfix expression.","rule":"Operand order matters for subtraction and division. Evaluate the space-separated postfix expression.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.postfix-evaluation.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.min-stack.model","title":"Min Stack: Mental Model","concept":"Store each value together with the minimum at the moment it is pushed.","summary":"Store each value together with the minimum at the moment it is pushed.","rule":"Pair each stack entry with a cached summary so pop restores the previous answer in constant time. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.min-stack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.min-stack.recognize","title":"Min Stack: When to Use It","concept":"constant-time minimum beside normal stack operations","summary":"Recognise the problem shape before choosing Min Stack.","rule":"The minimum of the stack prefix ending at that item. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.min-stack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.min-stack.challenge","title":"Challenge: Min Stack","concept":"Tokens pushN, pop and a final min arrive separated by spaces. Apply them in order and return the minimum of the remaining stack at min. The stack is nonempty at every pop and at min.","summary":"Tokens pushN, pop and a final min arrive separated by spaces. Apply them in order and return the minimum of the remaining stack at min. The stack is nonempty at every pop and at min.","rule":"The minimum of the stack prefix ending at that item. Tokens pushN, pop and a final min arrive separated by spaces. Apply them in order and return the minimum of the remaining stack at min. The stack is nonempty at every pop and at min.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.min-stack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.queue-with-stacks.model","title":"Queue from Two Stacks: Mental Model","concept":"Reverse the input stack into an output stack only when the output side is empty.","summary":"Reverse the input stack into an output stack only when the output side is empty.","rule":"Reverse the input stack into an output stack only when the output side is empty. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.queue-with-stacks.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.queue-with-stacks.recognize","title":"Queue from Two Stacks: When to Use It","concept":"amortised FIFO from LIFO primitives","summary":"Recognise the problem shape before choosing Queue from Two Stacks.","rule":"Reversing a whole batch restores FIFO order without disturbing older items. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.queue-with-stacks.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.queue-with-stacks.challenge","title":"Challenge: Queue from Two Stacks","concept":"Execute the space-separated queue operations and return the value produced by front.","summary":"Execute the space-separated queue operations and return the value produced by front.","rule":"Reversing a whole batch restores FIFO order without disturbing older items. Execute the space-separated queue operations and return the value produced by front.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.queue-with-stacks.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.next-greater-stack.model","title":"Next Greater Element: Mental Model","concept":"Keep unresolved indexes in decreasing value order and resolve them when a larger value appears.","summary":"Keep unresolved indexes in decreasing value order and resolve them when a larger value appears.","rule":"Keep unresolved indexes in decreasing value order and resolve them when a larger value appears. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.next-greater-stack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.next-greater-stack.recognize","title":"Next Greater Element: When to Use It","concept":"next warmer day, next greater price, span queries","summary":"Recognise the problem shape before choosing Next Greater Element.","rule":"It is the first larger value encountered to their right. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.next-greater-stack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.next-greater-stack.challenge","title":"Challenge: Next Greater Element","concept":"Return the next greater value to the right, or -1.","summary":"Return the next greater value to the right, or -1.","rule":"It is the first larger value encountered to their right. Return the next greater value to the right, or -1.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.next-greater-stack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.monotonic-increasing-stack.model","title":"Monotonic Increasing Stack: Mental Model","concept":"Pop larger candidates so the stack represents the nearest smaller boundary.","summary":"Pop larger candidates so the stack represents the nearest smaller boundary.","rule":"Pop larger candidates so the stack represents the nearest smaller boundary. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-increasing-stack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.monotonic-increasing-stack.recognize","title":"Monotonic Increasing Stack: When to Use It","concept":"nearest smaller values, histogram bounds, contribution counting","summary":"Recognise the problem shape before choosing Monotonic Increasing Stack.","rule":"Equal values do not satisfy the strict comparison. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-increasing-stack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.monotonic-increasing-stack.challenge","title":"Challenge: Monotonic Increasing Stack","concept":"Return the previous strictly smaller value for each item, or -1.","summary":"Return the previous strictly smaller value for each item, or -1.","rule":"Equal values do not satisfy the strict comparison. Return the previous strictly smaller value for each item, or -1.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-increasing-stack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.monotonic-decreasing-stack.model","title":"Monotonic Decreasing Stack: Mental Model","concept":"Pop smaller candidates so unresolved values remain in decreasing order.","summary":"Pop smaller candidates so unresolved values remain in decreasing order.","rule":"Pop smaller candidates so unresolved values remain in decreasing order. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-decreasing-stack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.monotonic-decreasing-stack.recognize","title":"Monotonic Decreasing Stack: When to Use It","concept":"stock span, next greater, visibility","summary":"Recognise the problem shape before choosing Monotonic Decreasing Stack.","rule":"That entire consecutive block is also no greater than today's price. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-decreasing-stack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.monotonic-decreasing-stack.challenge","title":"Challenge: Monotonic Decreasing Stack","concept":"Return the stock span for every day: the length of the consecutive block ending today whose earlier prices are no greater than today. Include today itself.","summary":"Return the stock span for every day: the length of the consecutive block ending today whose earlier prices are no greater than today. Include today itself.","rule":"That entire consecutive block is also no greater than today's price. Return the stock span for every day: the length of the consecutive block ending today whose earlier prices are no greater than today. Include today itself.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.monotonic-decreasing-stack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.circular-monotonic-stack.model","title":"Circular Monotonic Stack: Mental Model","concept":"Traverse indexes twice while storing each unresolved position only once.","summary":"Traverse indexes twice while storing each unresolved position only once.","rule":"Traverse indexes twice while storing each unresolved position only once. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.circular-monotonic-stack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.circular-monotonic-stack.recognize","title":"Circular Monotonic Stack: When to Use It","concept":"next greater in circular arrays","summary":"Recognise the problem shape before choosing Circular Monotonic Stack.","rule":"The second pass resolves wraparound answers without duplicating candidates. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.circular-monotonic-stack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.circular-monotonic-stack.challenge","title":"Challenge: Circular Monotonic Stack","concept":"Return each value's next greater value in circular order, or -1 when none exists.","summary":"Return each value's next greater value in circular order, or -1 when none exists.","rule":"The second pass resolves wraparound answers without duplicating candidates. Return each value's next greater value in circular order, or -1 when none exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.circular-monotonic-stack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.expression-shunting-yard.model","title":"Shunting-Yard Parsing: Mental Model","concept":"Use an operator stack to emit operations only when precedence and associativity allow.","summary":"Use an operator stack to emit operations only when precedence and associativity allow.","rule":"Use an operator stack to emit operations only when precedence and associativity allow. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.expression-shunting-yard.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.expression-shunting-yard.recognize","title":"Shunting-Yard Parsing: When to Use It","concept":"infix parsing and calculator implementations","summary":"Recognise the problem shape before choosing Shunting-Yard Parsing.","rule":"Equal-precedence operations must preserve left-to-right grouping. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.expression-shunting-yard.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.expression-shunting-yard.challenge","title":"Challenge: Shunting-Yard Parsing","concept":"Convert the infix expression to postfix tokens.","summary":"Convert the infix expression to postfix tokens.","rule":"Equal-precedence operations must preserve left-to-right grouping. Convert the infix expression to postfix tokens.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.expression-shunting-yard.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.largest-histogram.model","title":"Largest Histogram Rectangle: Mental Model","concept":"When height decreases, pop bars whose right boundary is now known and compute their maximal width.","summary":"When height decreases, pop bars whose right boundary is now known and compute their maximal width.","rule":"When height decreases, pop bars whose right boundary is now known and compute their maximal width. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.largest-histogram.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.largest-histogram.recognize","title":"Largest Histogram Rectangle: When to Use It","concept":"maximal rectangles and span-by-minimum problems","summary":"Recognise the problem shape before choosing Largest Histogram Rectangle.","rule":"The current lower bar and the remaining previous lower bar. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.largest-histogram.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-stacks-queues","id":"algorithm.largest-histogram.challenge","title":"Challenge: Largest Histogram Rectangle","concept":"Return the largest rectangle area under the histogram.","summary":"Return the largest rectangle area under the histogram.","rule":"The current lower bar and the remaining previous lower bar. Return the largest rectangle area under the histogram.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.largest-histogram.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.insertion-sort.model","title":"Insertion Sort: Mental Model","concept":"Grow a sorted prefix by shifting each new item to its insertion position.","summary":"Grow a sorted prefix by shifting each new item to its insertion position.","rule":"Grow a sorted prefix by shifting each new item to its insertion position. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.insertion-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.insertion-sort.recognize","title":"Insertion Sort: When to Use It","concept":"small inputs, nearly sorted data, online prefixes","summary":"Recognise the problem shape before choosing Insertion Sort.","rule":"Equal keys keep their original relative order. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.insertion-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.insertion-sort.challenge","title":"Challenge: Insertion Sort","concept":"Sort ascending with a stable insertion process. Input is either plain integers or keyed pairs (key,label); sort pairs by key only, keep equal keys in input order, and print each pair as its key immediately followed by its label.","summary":"Sort ascending with a stable insertion process. Input is either plain integers or keyed pairs (key,label); sort pairs by key only, keep equal keys in input order, and print each pair as its key immediately followed by its label.","rule":"Equal keys keep their original relative order. Sort ascending with a stable insertion process. Input is either plain integers or keyed pairs (key,label); sort pairs by key only, keep equal keys in input order, and print each pair as its key immediately followed by its label.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.insertion-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.selection-sort.model","title":"Selection Sort: Mental Model","concept":"Select the minimum remaining value and place it at the next boundary.","summary":"Select the minimum remaining value and place it at the next boundary.","rule":"Select the minimum remaining value and place it at the next boundary. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.selection-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.selection-sort.recognize","title":"Selection Sort: When to Use It","concept":"tiny arrays and minimum-swap teaching examples","summary":"Recognise the problem shape before choosing Selection Sort.","rule":"Exchanging two different positions when the suffix minimum is elsewhere. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.selection-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.selection-sort.challenge","title":"Challenge: Selection Sort","concept":"Sort ascending with classic selection sort, choosing the first occurrence of the minimum in each pass, and return the count of exchanges between different positions. Do not count self-swaps.","summary":"Sort ascending with classic selection sort, choosing the first occurrence of the minimum in each pass, and return the count of exchanges between different positions. Do not count self-swaps.","rule":"Exchanging two different positions when the suffix minimum is elsewhere. Sort ascending with classic selection sort, choosing the first occurrence of the minimum in each pass, and return the count of exchanges between different positions. Do not count self-swaps.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.selection-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.merge-sort.model","title":"Merge Sort: Mental Model","concept":"Sort halves independently, then merge two ordered streams without backtracking.","summary":"Sort halves independently, then merge two ordered streams without backtracking.","rule":"Sort halves independently, then merge two ordered streams without backtracking. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.merge-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.merge-sort.recognize","title":"Merge Sort: When to Use It","concept":"stable sorting, linked data, inversion counting","summary":"Recognise the problem shape before choosing Merge Sort.","rule":"It preserves the earlier item's original relative order. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.merge-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.merge-sort.challenge","title":"Challenge: Merge Sort","concept":"Return the sorted values and preserve the original order of equal keys.","summary":"Return the sorted values and preserve the original order of equal keys.","rule":"It preserves the earlier item's original relative order. Return the sorted values and preserve the original order of equal keys.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.merge-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.quicksort.model","title":"Quicksort: Mental Model","concept":"Partition around a pivot, then recurse only on the two unresolved regions.","summary":"Partition around a pivot, then recurse only on the two unresolved regions.","rule":"Partition around a pivot, then recurse only on the two unresolved regions. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.quicksort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.quicksort.recognize","title":"Quicksort: When to Use It","concept":"fast general in-memory sorting","summary":"Recognise the problem shape before choosing Quicksort.","rule":"It is already in final relative key position and is excluded from recursion. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.quicksort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.quicksort.challenge","title":"Challenge: Quicksort","concept":"Sort the values using an in-place partition.","summary":"Sort the values using an in-place partition.","rule":"It is already in final relative key position and is excluded from recursion. Sort the values using an in-place partition.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.quicksort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.heap-sort.model","title":"Heap Sort: Mental Model","concept":"Build a max heap and repeatedly move the maximum into its final suffix position.","summary":"Build a max heap and repeatedly move the maximum into its final suffix position.","rule":"Build a max heap and repeatedly move the maximum into its final suffix position. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.heap-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.heap-sort.recognize","title":"Heap Sort: When to Use It","concept":"bounded-memory worst-case sorting","summary":"Recognise the problem shape before choosing Heap Sort.","rule":"That position is its final ascending-sort position. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.heap-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.heap-sort.challenge","title":"Challenge: Heap Sort","concept":"Return the ascending ordering produced by an in-place max heap.","summary":"Return the ascending ordering produced by an in-place max heap.","rule":"That position is its final ascending-sort position. Return the ascending ordering produced by an in-place max heap.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.heap-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.counting-sort.model","title":"Counting Sort: Mental Model","concept":"Count every key in a small known range and emit keys by frequency.","summary":"Count every key in a small known range and emit keys by frequency.","rule":"Count every key in a small known range and emit keys by frequency. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.counting-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.counting-sort.recognize","title":"Counting Sort: When to Use It","concept":"dense bounded integers and histogram sorting","summary":"Recognise the problem shape before choosing Counting Sort.","rule":"Every key is an integer from 0 through 5. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.counting-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.counting-sort.challenge","title":"Challenge: Counting Sort","concept":"Sort values known to be in 0 through 5.","summary":"Sort values known to be in 0 through 5.","rule":"Every key is an integer from 0 through 5. Sort values known to be in 0 through 5.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.counting-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.radix-sort.model","title":"LSD Radix Sort: Mental Model","concept":"Apply a stable bucket pass from the least significant digit toward the most significant.","summary":"Apply a stable bucket pass from the least significant digit toward the most significant.","rule":"Apply a stable bucket pass from the least significant digit toward the most significant. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.radix-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.radix-sort.recognize","title":"LSD Radix Sort: When to Use It","concept":"fixed-width nonnegative integers and identifiers","summary":"Recognise the problem shape before choosing LSD Radix Sort.","rule":"Higher passes must retain ordering established by lower digits. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.radix-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.radix-sort.challenge","title":"Challenge: LSD Radix Sort","concept":"Sort the nonnegative integers, each fitting u32, in ascending order with stable least-significant-digit passes. The worked program uses 8-bit digits; any digit base that reaches every digit works.","summary":"Sort the nonnegative integers, each fitting u32, in ascending order with stable least-significant-digit passes. The worked program uses 8-bit digits; any digit base that reaches every digit works.","rule":"Higher passes must retain ordering established by lower digits. Sort the nonnegative integers, each fitting u32, in ascending order with stable least-significant-digit passes. The worked program uses 8-bit digits; any digit base that reaches every digit works.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.radix-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.bucket-sort.model","title":"Bucket Sort: Mental Model","concept":"Distribute values into range buckets, sort locally, and concatenate in bucket order.","summary":"Distribute values into range buckets, sort locally, and concatenate in bucket order.","rule":"Distribute values into range buckets, sort locally, and concatenate in bucket order. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bucket-sort.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.bucket-sort.recognize","title":"Bucket Sort: When to Use It","concept":"roughly uniform numeric distributions","summary":"Recognise the problem shape before choosing Bucket Sort.","rule":"Values are distributed across buckets without a large concentration in one bucket. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bucket-sort.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.bucket-sort.challenge","title":"Challenge: Bucket Sort","concept":"Values are decimals in [0,1). Distribute them into n buckets by floor(n*x), where n is the input length, sort each bucket, and return all values ascending.","summary":"Values are decimals in [0,1). Distribute them into n buckets by floor(n*x), where n is the input length, sort each bucket, and return all values ascending.","rule":"Values are distributed across buckets without a large concentration in one bucket. Values are decimals in [0,1). Distribute them into n buckets by floor(n*x), where n is the input length, sort each bucket, and return all values ascending.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bucket-sort.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.quickselect.model","title":"Quickselect: Mental Model","concept":"Partition like quicksort but recurse only into the side containing the requested rank.","summary":"Partition like quicksort but recurse only into the side containing the requested rank.","rule":"Partition like quicksort but recurse only into the side containing the requested rank. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.quickselect.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.quickselect.recognize","title":"Quickselect: When to Use It","concept":"kth order statistic without fully sorting","summary":"Recognise the problem shape before choosing Quickselect.","rule":"The sizes of the lower and equal regions determine which region contains k. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.quickselect.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.quickselect.challenge","title":"Challenge: Quickselect","concept":"Return the third smallest value.","summary":"Return the third smallest value.","rule":"The sizes of the lower and equal regions determine which region contains k. Return the third smallest value.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.quickselect.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.median-of-medians.model","title":"Median of Medians: Mental Model","concept":"Choose a guaranteed-good pivot from medians of small groups before selecting one side.","summary":"Choose a guaranteed-good pivot from medians of small groups before selecting one side.","rule":"Choose a guaranteed-good pivot from medians of small groups before selecting one side. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.median-of-medians.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.median-of-medians.recognize","title":"Median of Medians: When to Use It","concept":"worst-case linear selection and adversarial inputs","summary":"Recognise the problem shape before choosing Median of Medians.","rule":"Median grouping guarantees a constant fraction can be discarded. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.median-of-medians.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-sorting-selection","id":"algorithm.median-of-medians.challenge","title":"Challenge: Median of Medians","concept":"Return the fifth smallest value using deterministic selection.","summary":"Return the fifth smallest value using deterministic selection.","rule":"Median grouping guarantees a constant fraction can be discarded. Return the fifth smallest value using deterministic selection.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.median-of-medians.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.binary-exact.model","title":"Exact Binary Search: Mental Model","concept":"Discard the half that cannot contain the target after comparing the midpoint.","summary":"Discard the half that cannot contain the target after comparing the midpoint.","rule":"Discard the half that cannot contain the target after comparing the midpoint. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binary-exact.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.binary-exact.recognize","title":"Exact Binary Search: When to Use It","concept":"exact lookup in sorted random-access data","summary":"Recognise the problem shape before choosing Exact Binary Search.","rule":"The insertion position may contain a larger value or lie at the end. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binary-exact.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.binary-exact.challenge","title":"Challenge: Exact Binary Search","concept":"Return the index of 9, or -1 if absent.","summary":"Return the index of 9, or -1 if absent.","rule":"The insertion position may contain a larger value or lie at the end. Return the index of 9, or -1 if absent.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.binary-exact.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.lower-bound.model","title":"Lower Bound: Mental Model","concept":"Maintain the first position that may still hold a value greater than or equal to target.","summary":"Maintain the first position that may still hold a value greater than or equal to target.","rule":"Keep one boundary on each side of the answer and narrow them until they meet. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lower-bound.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.lower-bound.recognize","title":"Lower Bound: When to Use It","concept":"insertion positions, first valid value, duplicate ranges","summary":"Recognise the problem shape before choosing Lower Bound.","rule":"value is at least the target. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lower-bound.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.lower-bound.challenge","title":"Challenge: Lower Bound","concept":"Return the first index whose value is at least 4, or the array length when every value is below 4.","summary":"Return the first index whose value is at least 4, or the array length when every value is below 4.","rule":"value is at least the target. Return the first index whose value is at least 4, or the array length when every value is below 4.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.lower-bound.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.upper-bound.model","title":"Upper Bound: Mental Model","concept":"Maintain the first position whose value is strictly greater than target.","summary":"Maintain the first position whose value is strictly greater than target.","rule":"Maintain the first position whose value is strictly greater than target. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.upper-bound.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.upper-bound.recognize","title":"Upper Bound: When to Use It","concept":"duplicate counts, right insertion positions","summary":"Recognise the problem shape before choosing Upper Bound.","rule":"They belong to the discarded lower side. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.upper-bound.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.upper-bound.challenge","title":"Challenge: Upper Bound","concept":"Return the first index whose value is greater than 4, or the array length when no value is greater.","summary":"Return the first index whose value is greater than 4, or the array length when no value is greater.","rule":"They belong to the discarded lower side. Return the first index whose value is greater than 4, or the array length when no value is greater.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.upper-bound.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.first-last-position.model","title":"First and Last Position: Mental Model","concept":"Run two boundary searches instead of expanding linearly from one match.","summary":"Run two boundary searches instead of expanding linearly from one match.","rule":"Run two boundary searches instead of expanding linearly from one match. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.first-last-position.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.first-last-position.recognize","title":"First and Last Position: When to Use It","concept":"complete duplicate range in sorted data","summary":"Recognise the problem shape before choosing First and Last Position.","rule":"Their interval contains all and only the equal values. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.first-last-position.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.first-last-position.challenge","title":"Challenge: First and Last Position","concept":"Return the first and last index of 8 in the sorted values as first,last, or -1,-1 if 8 is absent.","summary":"Return the first and last index of 8 in the sorted values as first,last, or -1,-1 if 8 is absent.","rule":"Their interval contains all and only the equal values. Return the first and last index of 8 in the sorted values as first,last, or -1,-1 if 8 is absent.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.first-last-position.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.rotated-search.model","title":"Rotated Sorted Search: Mental Model","concept":"At least one half remains sorted; use that fact to choose the viable side.","summary":"At least one half remains sorted; use that fact to choose the viable side.","rule":"Compare the midpoint with the interval ends to learn the rotation's shape, then choose the viable side. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rotated-search.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.rotated-search.recognize","title":"Rotated Sorted Search: When to Use It","concept":"lookup in a rotated distinct sorted array","summary":"Recognise the problem shape before choosing Rotated Sorted Search.","rule":"At least one half is sorted and its endpoint range can be tested. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rotated-search.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.rotated-search.challenge","title":"Challenge: Rotated Sorted Search","concept":"Return the index of 0 in the rotated sorted array of distinct values, or -1 if 0 is absent.","summary":"Return the index of 0 in the rotated sorted array of distinct values, or -1 if 0 is absent.","rule":"At least one half is sorted and its endpoint range can be tested. Return the index of 0 in the rotated sorted array of distinct values, or -1 if 0 is absent.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.rotated-search.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.peak-search.model","title":"Peak Binary Search: Mental Model","concept":"Compare adjacent slopes; one side is guaranteed to contain a peak.","summary":"Compare adjacent slopes; one side is guaranteed to contain a peak.","rule":"Compare adjacent slopes; one side is guaranteed to contain a peak. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.peak-search.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.peak-search.recognize","title":"Peak Binary Search: When to Use It","concept":"local maxima in unimodal or arbitrary peak-promising arrays","summary":"Recognise the problem shape before choosing Peak Binary Search.","rule":"A peak exists on that side under the unequal-neighbor contract. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.peak-search.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.peak-search.challenge","title":"Challenge: Peak Binary Search","concept":"Parse a nonempty array with unequal adjacent values. Return any strict peak index, treating outside endpoint values as negative infinity.","summary":"Parse a nonempty array with unequal adjacent values. Return any strict peak index, treating outside endpoint values as negative infinity.","rule":"A peak exists on that side under the unequal-neighbor contract. Parse a nonempty array with unequal adjacent values. Return any strict peak index, treating outside endpoint values as negative infinity.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.peak-search.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.matrix-binary-search.model","title":"Flattened Matrix Search: Mental Model","concept":"Map a flat midpoint back to row and column when rows form one global sorted order.","summary":"Map a flat midpoint back to row and column when rows form one global sorted order.","rule":"Map a flat midpoint back to row and column when rows form one global sorted order. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-binary-search.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.matrix-binary-search.recognize","title":"Flattened Matrix Search: When to Use It","concept":"sorted rectangular matrices","summary":"Recognise the problem shape before choosing Flattened Matrix Search.","rule":"Every row is sorted and each next row starts after the previous row ends. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-binary-search.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.matrix-binary-search.challenge","title":"Challenge: Flattened Matrix Search","concept":"Return whether 16 is present.","summary":"Return whether 16 is present.","rule":"Every row is sorted and each next row starts after the previous row ends. Return whether 16 is present.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-binary-search.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.binary-search-answer.model","title":"Binary Search on the Answer: Mental Model","concept":"Search a numeric answer space whose feasibility predicate changes only once.","summary":"Search a numeric answer space whose feasibility predicate changes only once.","rule":"Search a numeric answer space whose feasibility predicate changes only once. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binary-search-answer.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.binary-search-answer.recognize","title":"Binary Search on the Answer: When to Use It","concept":"minimum capacity, maximum minimum distance, allocation bounds","summary":"Recognise the problem shape before choosing Binary Search on the Answer.","rule":"If capacity C is feasible, any larger capacity is also feasible. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binary-search-answer.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.binary-search-answer.challenge","title":"Challenge: Binary Search on the Answer","concept":"Parse positive weights and a positive days limit. Preserve input order and return the minimum daily capacity that ships all weights in at most that many days.","summary":"Parse positive weights and a positive days limit. Preserve input order and return the minimum daily capacity that ships all weights in at most that many days.","rule":"If capacity C is feasible, any larger capacity is also feasible. Parse positive weights and a positive days limit. Preserve input order and return the minimum daily capacity that ships all weights in at most that many days.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.binary-search-answer.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.exponential-search.model","title":"Exponential Search: Mental Model","concept":"Double the search boundary until it brackets the target, then binary-search that finite range.","summary":"Double the search boundary until it brackets the target, then binary-search that finite range.","rule":"Double the search boundary until it brackets the target, then binary-search that finite range. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.exponential-search.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.exponential-search.recognize","title":"Exponential Search: When to Use It","concept":"unknown-length sorted streams and unbounded indexes","summary":"Recognise the problem shape before choosing Exponential Search.","rule":"It locates a bracket with logarithmic work in the target position. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.exponential-search.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.exponential-search.challenge","title":"Challenge: Exponential Search","concept":"Return the index of 21 in the ascending values using exponential bracketing, or -1 if 21 is absent.","summary":"Return the index of 21 in the ascending values using exponential bracketing, or -1 if 21 is absent.","rule":"It locates a bracket with logarithmic work in the target position. Return the index of 21 in the ascending values using exponential bracketing, or -1 if 21 is absent.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.exponential-search.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.partition-median.model","title":"Partition Median: Mental Model","concept":"Binary-search a partition where every left-side value is no larger than every right-side value.","summary":"Binary-search a partition where every left-side value is no larger than every right-side value.","rule":"Binary-search a cut in the shorter array and derive the matching cut in the other. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.partition-median.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.partition-median.recognize","title":"Partition Median: When to Use It","concept":"median or kth item across two sorted arrays","summary":"Recognise the problem shape before choosing Partition Median.","rule":"Both left-side maxima are no greater than the opposite right-side minima. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.partition-median.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-binary-search","id":"algorithm.partition-median.challenge","title":"Challenge: Partition Median","concept":"Return the median of the two sorted arrays.","summary":"Return the median of the two sorted arrays.","rule":"Both left-side maxima are no greater than the opposite right-side minima. Return the median of the two sorted arrays.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.partition-median.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-reversal.model","title":"Iterative List Reversal: Mental Model","concept":"Detach the next link before redirecting the current node toward the reversed prefix.","summary":"Detach the next link before redirecting the current node toward the reversed prefix.","rule":"Detach the next link before redirecting the current node toward the reversed prefix. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-reversal.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-reversal.recognize","title":"Iterative List Reversal: When to Use It","concept":"reverse traversal order and ownership-safe rewiring","summary":"Recognise the problem shape before choosing Iterative List Reversal.","rule":"The unread suffix must remain reachable. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-reversal.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-reversal.challenge","title":"Challenge: Iterative List Reversal","concept":"Return the node values after reversing the list.","summary":"Return the node values after reversing the list.","rule":"The unread suffix must remain reachable. Return the node values after reversing the list.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.list-reversal.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-middle.model","title":"Middle by Slow/Fast: Mental Model","concept":"Move one pointer once and another twice so the slow pointer reaches the middle.","summary":"Move one pointer once and another twice so the slow pointer reaches the middle.","rule":"Move one pointer once and another twice so the slow pointer reaches the middle. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-middle.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-middle.recognize","title":"Middle by Slow/Fast: When to Use It","concept":"middle node and half splitting","summary":"Recognise the problem shape before choosing Middle by Slow/Fast.","rule":"Each fast pair advances slow once and chooses the second even middle. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-middle.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-middle.challenge","title":"Challenge: Middle by Slow/Fast","concept":"Return the middle value of the list; for even length return the second middle.","summary":"Return the middle value of the list; for even length return the second middle.","rule":"Each fast pair advances slow once and chooses the second even middle. Return the middle value of the list; for even length return the second middle.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.list-middle.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-cycle.model","title":"Linked Cycle Detection: Mental Model","concept":"Different pointer speeds meet inside a cycle but never in a finite acyclic list.","summary":"Different pointer speeds meet inside a cycle but never in a finite acyclic list.","rule":"Different pointer speeds meet inside a cycle but never in a finite acyclic list. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-cycle.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-cycle.recognize","title":"Linked Cycle Detection: When to Use It","concept":"cycle existence in pointer chains","summary":"Recognise the problem shape before choosing Linked Cycle Detection.","rule":"Different nodes can contain equal values without forming a cycle. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-cycle.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-cycle.challenge","title":"Challenge: Linked Cycle Detection","concept":"Parse values plus one link form: tail->k (the last node links to zero-based node k), tail->none, or next=[...] (each node's next index or none). Starting from node 0, return whether following links ever repeats a node. An empty list has no cycle. Compare node indexes, not values.","summary":"Parse values plus one link form: tail->k (the last node links to zero-based node k), tail->none, or next=[...] (each node's next index or none). Starting from node 0, return whether following links ever repeats a node. An empty list has no cycle. Compare node indexes, not values.","rule":"Different nodes can contain equal values without forming a cycle. Parse values plus one link form: tail->k (the last node links to zero-based node k), tail->none, or next=[...] (each node's next index or none). Starting from node 0, return whether following links ever repeats a node. An empty list has no cycle. Compare node indexes, not values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.list-cycle.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.merge-two-lists.model","title":"Merge Two Sorted Lists: Mental Model","concept":"Always detach the smaller head and append it to the merged tail.","summary":"Always detach the smaller head and append it to the merged tail.","rule":"Merge by moving ownership of existing nodes, one per comparison, until one list runs out. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.merge-two-lists.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.merge-two-lists.recognize","title":"Merge Two Sorted Lists: When to Use It","concept":"sorted streams and divide-and-conquer merge","summary":"Recognise the problem shape before choosing Merge Two Sorted Lists.","rule":"Detach the smaller head and append that node to the output tail. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.merge-two-lists.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.merge-two-lists.challenge","title":"Challenge: Merge Two Sorted Lists","concept":"Return the merged sorted values.","summary":"Return the merged sorted values.","rule":"Detach the smaller head and append that node to the output tail. Return the merged sorted values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.merge-two-lists.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.remove-nth-from-end.model","title":"Gap Pointer Removal: Mental Model","concept":"Keep a fixed gap so the leading pointer reaching the end positions the trailing pointer before the target.","summary":"Keep a fixed gap so the leading pointer reaching the end positions the trailing pointer before the target.","rule":"Walk the list once with two cursors, then unlink the target through its predecessor. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.remove-nth-from-end.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.remove-nth-from-end.recognize","title":"Gap Pointer Removal: When to Use It","concept":"nth from end without a length pass","summary":"Recognise the problem shape before choosing Gap Pointer Removal.","rule":"Open a gap of two links, then move both cursors until the lead reaches the last node. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.remove-nth-from-end.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.remove-nth-from-end.challenge","title":"Challenge: Gap Pointer Removal","concept":"Remove the second node from the end of a list with at least two nodes and return the remaining values.","summary":"Remove the second node from the end of a list with at least two nodes and return the remaining values.","rule":"Open a gap of two links, then move both cursors until the lead reaches the last node. Remove the second node from the end of a list with at least two nodes and return the remaining values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.remove-nth-from-end.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-intersection.model","title":"Pointer-Switch Intersection: Mental Model","concept":"Switch each pointer to the other head so both traverse equal combined distance.","summary":"Switch each pointer to the other head so both traverse equal combined distance.","rule":"Switch each pointer to the other head so both traverse equal combined distance. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-intersection.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-intersection.recognize","title":"Pointer-Switch Intersection: When to Use It","concept":"shared-tail intersection without lengths","summary":"Recognise the problem shape before choosing Pointer-Switch Intersection.","rule":"They are the same node allocation, not merely equal values. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.list-intersection.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.list-intersection.challenge","title":"Challenge: Pointer-Switch Intersection","concept":"Input is one of two forms. a_prefix, b_prefix and shared arrays: build separate prefix nodes and attach both to the same shared tail. Or values=[...] next=[...] a=i b=j: an arena of nodes where next holds each node's next index or none, and a and b are the two head indexes. Return the first shared node's value, or none when the lists share no node. Equal values do not identify shared nodes.","summary":"Input is one of two forms. a_prefix, b_prefix and shared arrays: build separate prefix nodes and attach both to the same shared tail. Or values=[...] next=[...] a=i b=j: an arena of nodes where next holds each node's next index or none, and a and b are the two head indexes. Return the first…","rule":"They are the same node allocation, not merely equal values. Input is one of two forms. a_prefix, b_prefix and shared arrays: build separate prefix nodes and attach both to the same shared tail. Or values=[...] next=[...] a=i b=j: an arena of nodes where next holds each node's next index or none, and a and b are the two head indexes. Return the first shared node's value, or none when the lists share no node. Equal values do not identify shared nodes.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.list-intersection.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.partition-list.model","title":"Stable List Partition: Mental Model","concept":"Build two stable chains around a pivot and join them after traversal.","summary":"Build two stable chains around a pivot and join them after traversal.","rule":"Build two stable chains around a pivot and join them after traversal. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.partition-list.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.partition-list.recognize","title":"Stable List Partition: When to Use It","concept":"stable less-than partitioning","summary":"Recognise the problem shape before choosing Stable List Partition.","rule":"Append each detached node to the tail of its chosen chain. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.partition-list.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.partition-list.challenge","title":"Challenge: Stable List Partition","concept":"Partition around 3 while preserving order within both groups.","summary":"Partition around 3 while preserving order within both groups.","rule":"Append each detached node to the tail of its chosen chain. Partition around 3 while preserving order within both groups.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.partition-list.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.reorder-list.model","title":"Reorder by Split, Reverse, Merge: Mental Model","concept":"Find the middle, reverse the second half, then alternate nodes from both halves.","summary":"Find the middle, reverse the second half, then alternate nodes from both halves.","rule":"Find the middle, reverse the second half, then alternate nodes from both halves. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.reorder-list.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.reorder-list.recognize","title":"Reorder by Split, Reverse, Merge: When to Use It","concept":"outside-in list ordering","summary":"Recognise the problem shape before choosing Reorder by Split, Reverse, Merge.","rule":"Its nodes are then available in last-to-middle order. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.reorder-list.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.reorder-list.challenge","title":"Challenge: Reorder by Split, Reverse, Merge","concept":"Reorder first, last, second, second-last and so on.","summary":"Reorder first, last, second, second-last and so on.","rule":"Its nodes are then available in last-to-middle order. Reorder first, last, second, second-last and so on.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.reorder-list.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.copy-random-list.model","title":"Copy with Random Links: Mental Model","concept":"Map old nodes to new nodes or interleave copies so arbitrary links can be reconstructed.","summary":"Map old nodes to new nodes or interleave copies so arbitrary links can be reconstructed.","rule":"Map old nodes to new nodes or interleave copies so arbitrary links can be reconstructed. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.copy-random-list.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.copy-random-list.recognize","title":"Copy with Random Links: When to Use It","concept":"deep copy of graphs shaped like a list","summary":"Recognise the problem shape before choosing Copy with Random Links.","rule":"An old index names a source node, so each link must be rewritten to the matching copied node. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.copy-random-list.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.copy-random-list.challenge","title":"Challenge: Copy with Random Links","concept":"Parse values, random (each a node index or null) and optional next (each node's next index or none; when absent, nodes link in array order). Every node is reachable from node 0. Deep-copy the list, following next, with an old-to-new map. Return value:target for each copied node in list order, where target is the random node's position in the copied list, or null. Values may repeat, so identify nodes by index.","summary":"Parse values, random (each a node index or null) and optional next (each node's next index or none; when absent, nodes link in array order). Every node is reachable from node 0. Deep-copy the list, following next, with an old-to-new map. Return value:target for each copied node in list order,…","rule":"An old index names a source node, so each link must be rewritten to the matching copied node. Parse values, random (each a node index or null) and optional next (each node's next index or none; when absent, nodes link in array order). Every node is reachable from node 0. Deep-copy the list, following next, with an old-to-new map. Return value:target for each copied node in list order, where target is the random node's position in the copied list, or null. Values may repeat, so identify nodes by index.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.copy-random-list.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.reverse-k-group.model","title":"Reverse Nodes in K-Groups: Mental Model","concept":"Verify a complete group exists, reverse exactly that range, then reconnect both boundaries.","summary":"Verify a complete group exists, reverse exactly that range, then reconnect both boundaries.","rule":"Verify a complete group exists, reverse exactly that range, then reconnect both boundaries. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.reverse-k-group.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.reverse-k-group.recognize","title":"Reverse Nodes in K-Groups: When to Use It","concept":"block-wise list transformations","summary":"Recognise the problem shape before choosing Reverse Nodes in K-Groups.","rule":"A short suffix must remain in its original order. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.reverse-k-group.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-linked-lists","id":"algorithm.reverse-k-group.challenge","title":"Challenge: Reverse Nodes in K-Groups","concept":"Reverse nodes in groups of three; leave a short suffix unchanged.","summary":"Reverse nodes in groups of three; leave a short suffix unchanged.","rule":"A short suffix must remain in its original order. Reverse nodes in groups of three; leave a short suffix unchanged.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.reverse-k-group.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-preorder.model","title":"Preorder DFS: Mental Model","concept":"Process the node before its children so parent context is available first.","summary":"Process the node before its children so parent context is available first.","rule":"Work top-down so parent context is available to the subtrees below. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-preorder.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-preorder.recognize","title":"Preorder DFS: When to Use It","concept":"serialization prefixes, copying, path construction","summary":"Recognise the problem shape before choosing Preorder DFS.","rule":"Before its left and right subtrees. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-preorder.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-preorder.challenge","title":"Challenge: Preorder DFS","concept":"Parse the compact level-order binary tree, where null omits a node. Return its preorder values.","summary":"Parse the compact level-order binary tree, where null omits a node. Return its preorder values.","rule":"Before its left and right subtrees. Parse the compact level-order binary tree, where null omits a node. Return its preorder values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-preorder.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-inorder.model","title":"Inorder DFS: Mental Model","concept":"Visit left, node, then right; in a BST this emits sorted keys.","summary":"Visit left, node, then right; in a BST this emits sorted keys.","rule":"Visit left, node, then right; in a BST this emits sorted keys. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-inorder.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-inorder.recognize","title":"Inorder DFS: When to Use It","concept":"BST iteration and expression trees","summary":"Recognise the problem shape before choosing Inorder DFS.","rule":"It visits the lower-valued left subtree, then node, then right subtree. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-inorder.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-inorder.challenge","title":"Challenge: Inorder DFS","concept":"Parse the compact level-order binary tree, where null omits a node. Return its inorder values; the tree need not be a BST.","summary":"Parse the compact level-order binary tree, where null omits a node. Return its inorder values; the tree need not be a BST.","rule":"It visits the lower-valued left subtree, then node, then right subtree. Parse the compact level-order binary tree, where null omits a node. Return its inorder values; the tree need not be a BST.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-inorder.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-postorder.model","title":"Postorder DFS: Mental Model","concept":"Process children before the node so child results are complete when combined.","summary":"Process children before the node so child results are complete when combined.","rule":"Process children before the node so child results are complete when combined. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-postorder.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-postorder.recognize","title":"Postorder DFS: When to Use It","concept":"height, deletion, subtree aggregation","summary":"Recognise the problem shape before choosing Postorder DFS.","rule":"Both child subtrees are processed before the parent. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-postorder.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-postorder.challenge","title":"Challenge: Postorder DFS","concept":"Parse the compact level-order binary tree, where null omits a node. Return its postorder values.","summary":"Parse the compact level-order binary tree, where null omits a node. Return its postorder values.","rule":"Both child subtrees are processed before the parent. Parse the compact level-order binary tree, where null omits a node. Return its postorder values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-postorder.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-level-order.model","title":"Level-Order BFS: Mental Model","concept":"Queue nodes and process exactly the current queue length to preserve level boundaries.","summary":"Queue nodes and process exactly the current queue length to preserve level boundaries.","rule":"Queue nodes and process exactly the current queue length to preserve level boundaries. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-level-order.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-level-order.recognize","title":"Level-Order BFS: When to Use It","concept":"shortest unweighted depth and level summaries","summary":"Recognise the problem shape before choosing Level-Order BFS.","rule":"Newly enqueued children belong to the next level. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-level-order.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-level-order.challenge","title":"Challenge: Level-Order BFS","concept":"Parse the compact level-order binary tree, where null omits a node. Return the sum of each level from the root downward.","summary":"Parse the compact level-order binary tree, where null omits a node. Return the sum of each level from the root downward.","rule":"Newly enqueued children belong to the next level. Parse the compact level-order binary tree, where null omits a node. Return the sum of each level from the root downward.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-level-order.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-height-balance.model","title":"Height with Balance Sentinel: Mental Model","concept":"Return height normally but propagate a sentinel immediately when a subtree is already unbalanced.","summary":"Return height normally but propagate a sentinel immediately when a subtree is already unbalanced.","rule":"Return height normally but propagate a sentinel immediately when a subtree is already unbalanced. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-height-balance.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-height-balance.recognize","title":"Height with Balance Sentinel: When to Use It","concept":"balanced-tree validation without repeated heights","summary":"Recognise the problem shape before choosing Height with Balance Sentinel.","rule":"One postorder pass can detect imbalance and compute heights. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-height-balance.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-height-balance.challenge","title":"Challenge: Height with Balance Sentinel","concept":"Parse the compact level-order binary tree, where null omits a node. Return whether every subtree has child heights differing by at most one.","summary":"Parse the compact level-order binary tree, where null omits a node. Return whether every subtree has child heights differing by at most one.","rule":"One postorder pass can detect imbalance and compute heights. Parse the compact level-order binary tree, where null omits a node. Return whether every subtree has child heights differing by at most one.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-height-balance.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.bst-search-insert.model","title":"BST Search and Insert: Mental Model","concept":"Use the ordering invariant to follow one child and preserve it at insertion.","summary":"Use the ordering invariant to follow one child and preserve it at insertion.","rule":"Use the ordering invariant to follow one child and preserve it at insertion. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bst-search-insert.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.bst-search-insert.recognize","title":"BST Search and Insert: When to Use It","concept":"ordered sets and maps","summary":"Recognise the problem shape before choosing BST Search and Insert.","rule":"The left subtree. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bst-search-insert.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.bst-search-insert.challenge","title":"Challenge: BST Search and Insert","concept":"Parse the level-order BST, insert 5 (equal keys go right), then return inorder values. With a trailing order=preorder, return preorder values instead, which reveal where 5 landed.","summary":"Parse the level-order BST, insert 5 (equal keys go right), then return inorder values. With a trailing order=preorder, return preorder values instead, which reveal where 5 landed.","rule":"The left subtree. Parse the level-order BST, insert 5 (equal keys go right), then return inorder values. With a trailing order=preorder, return preorder values instead, which reveal where 5 landed.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bst-search-insert.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.lowest-common-ancestor.model","title":"Lowest Common Ancestor: Mental Model","concept":"Combine child evidence; the first node reached from both targets is their lowest shared ancestor.","summary":"Combine child evidence; the first node reached from both targets is their lowest shared ancestor.","rule":"Combine child evidence; the first node reached from both targets is their lowest shared ancestor. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lowest-common-ancestor.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.lowest-common-ancestor.recognize","title":"Lowest Common Ancestor: When to Use It","concept":"hierarchy relationships and path convergence","summary":"Recognise the problem shape before choosing Lowest Common Ancestor.","rule":"The current node is the lowest common ancestor. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lowest-common-ancestor.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.lowest-common-ancestor.challenge","title":"Challenge: Lowest Common Ancestor","concept":"Parse a binary tree with unique values containing both 5 and 1; return their lowest common ancestor value.","summary":"Parse a binary tree with unique values containing both 5 and 1; return their lowest common ancestor value.","rule":"The current node is the lowest common ancestor. Parse a binary tree with unique values containing both 5 and 1; return their lowest common ancestor value.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.lowest-common-ancestor.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-serialize.model","title":"Tree Serialize/Deserialize: Mental Model","concept":"Emit null markers as well as values so structure is reconstructible, not only traversal order.","summary":"Emit null markers as well as values so structure is reconstructible, not only traversal order.","rule":"Emit null markers as well as values so structure is reconstructible, not only traversal order. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-serialize.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-serialize.recognize","title":"Tree Serialize/Deserialize: When to Use It","concept":"persistence, transport, tree cloning","summary":"Recognise the problem shape before choosing Tree Serialize/Deserialize.","rule":"Values alone do not encode the tree's shape. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-serialize.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-serialize.challenge","title":"Challenge: Tree Serialize/Deserialize","concept":"Given tree=[...], a compact level-order tree where null omits a node, serialize it in preorder using comma separators and # for every missing child. Given data=... instead, deserialize that preorder text and return the tree's inorder values.","summary":"Given tree=[...], a compact level-order tree where null omits a node, serialize it in preorder using comma separators and # for every missing child. Given data=... instead, deserialize that preorder text and return the tree's inorder values.","rule":"Values alone do not encode the tree's shape. Given tree=[...], a compact level-order tree where null omits a node, serialize it in preorder using comma separators and # for every missing child. Given data=... instead, deserialize that preorder text and return the tree's inorder values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-serialize.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-diameter.model","title":"Tree Diameter: Mental Model","concept":"At each node combine the two deepest child paths while returning only the deepest one upward.","summary":"At each node combine the two deepest child paths while returning only the deepest one upward.","rule":"At each node combine the two deepest child paths while returning only the deepest one upward. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-diameter.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-diameter.recognize","title":"Tree Diameter: When to Use It","concept":"longest path in a tree and path-through-node aggregation","summary":"Recognise the problem shape before choosing Tree Diameter.","rule":"It counts the edges in the longest path through that node. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-diameter.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-diameter.challenge","title":"Challenge: Tree Diameter","concept":"Parse the compact level-order binary tree, where null omits a node. Return the diameter measured in edges; the longest path need not pass through the root.","summary":"Parse the compact level-order binary tree, where null omits a node. Return the diameter measured in edges; the longest path need not pass through the root.","rule":"It counts the edges in the longest path through that node. Parse the compact level-order binary tree, where null omits a node. Return the diameter measured in edges; the longest path need not pass through the root.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-diameter.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-rerooting.model","title":"Tree Rerooting DP: Mental Model","concept":"Compute child-to-parent contributions, then propagate the outside contribution while changing the root.","summary":"Compute child-to-parent contributions, then propagate the outside contribution while changing the root.","rule":"Compute child-to-parent contributions, then propagate the outside contribution while changing the root. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-rerooting.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-rerooting.recognize","title":"Tree Rerooting DP: When to Use It","concept":"all-node distance sums and per-root tree answers","summary":"Recognise the problem shape before choosing Tree Rerooting DP.","rule":"Distances decrease for the moved-into subtree and increase for all other nodes. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-rerooting.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-trees","id":"algorithm.tree-rerooting.challenge","title":"Challenge: Tree Rerooting DP","concept":"Parse n and edges of a connected undirected tree on 0..n-1. Return the sum of distances from each vertex, in vertex order.","summary":"Parse n and edges of a connected undirected tree on 0..n-1. Return the sum of distances from each vertex, in vertex order.","rule":"Distances decrease for the moved-into subtree and increase for all other nodes. Parse n and edges of a connected undirected tree on 0..n-1. Return the sum of distances from each vertex, in vertex order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-rerooting.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.binary-heap.model","title":"Binary Heap: Mental Model","concept":"Maintain a complete tree where every parent outranks its children.","summary":"Maintain a complete tree where every parent outranks its children.","rule":"Maintain a complete tree where every parent outranks its children. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binary-heap.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.binary-heap.recognize","title":"Binary Heap: When to Use It","concept":"priority queues, repeated min or max extraction","summary":"Recognise the problem shape before choosing Binary Heap.","rule":"BinaryHeap normally exposes the largest value. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binary-heap.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.binary-heap.challenge","title":"Challenge: Binary Heap","concept":"Insert the values into a min-heap and return pop order.","summary":"Insert the values into a min-heap and return pop order.","rule":"BinaryHeap normally exposes the largest value. Insert the values into a min-heap and return pop order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.binary-heap.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.top-k-minheap.model","title":"Top-K with a Min-Heap: Mental Model","concept":"Keep a heap of only k winners and evict its smallest whenever it grows.","summary":"Keep a heap of only k winners and evict its smallest whenever it grows.","rule":"Keep a heap of only k winners and evict its smallest whenever it grows. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.top-k-minheap.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.top-k-minheap.recognize","title":"Top-K with a Min-Heap: When to Use It","concept":"largest k values and bounded leaderboards","summary":"Recognise the problem shape before choosing Top-K with a Min-Heap.","rule":"Its smallest retained value is the one to discard when a larger candidate arrives. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.top-k-minheap.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.top-k-minheap.challenge","title":"Challenge: Top-K with a Min-Heap","concept":"Return the three largest values in descending order.","summary":"Return the three largest values in descending order.","rule":"Its smallest retained value is the one to discard when a larger candidate arrives. Return the three largest values in descending order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.top-k-minheap.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.kth-stream.model","title":"Kth Statistic in a Stream: Mental Model","concept":"Keep k candidates so the heap root is the kth largest value after every insertion.","summary":"Keep k candidates so the heap root is the kth largest value after every insertion.","rule":"Keep k candidates so the heap root is the kth largest value after every insertion. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kth-stream.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.kth-stream.recognize","title":"Kth Statistic in a Stream: When to Use It","concept":"live rank tracking and rolling thresholds","summary":"Recognise the problem shape before choosing Kth Statistic in a Stream.","rule":"Fewer than k observations do not define a kth largest value. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kth-stream.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.kth-stream.challenge","title":"Challenge: Kth Statistic in a Stream","concept":"Parse the integer stream, written [...] with an optional stream= prefix. With k=3, return the third largest value after each insertion, starting once three values have arrived.","summary":"Parse the integer stream, written [...] with an optional stream= prefix. With k=3, return the third largest value after each insertion, starting once three values have arrived.","rule":"Fewer than k observations do not define a kth largest value. Parse the integer stream, written [...] with an optional stream= prefix. With k=3, return the third largest value after each insertion, starting once three values have arrived.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.kth-stream.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.k-way-merge.model","title":"K-Way Heap Merge: Mental Model","concept":"Push one frontier item per sorted source and advance only the source that wins.","summary":"Push one frontier item per sorted source and advance only the source that wins.","rule":"Push one frontier item per sorted source and advance only the source that wins. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.k-way-merge.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.k-way-merge.recognize","title":"K-Way Heap Merge: When to Use It","concept":"merge sorted lists, files, and event streams","summary":"Recognise the problem shape before choosing K-Way Heap Merge.","rule":"No later item from that source can precede its current head. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.k-way-merge.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.k-way-merge.challenge","title":"Challenge: K-Way Heap Merge","concept":"Merge the three sorted sequences.","summary":"Merge the three sorted sequences.","rule":"No later item from that source can precede its current head. Merge the three sorted sequences.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.k-way-merge.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.closest-k-heap.model","title":"Bounded Heap for K Closest: Mental Model","concept":"Keep the worst current winner at the root so a better candidate replaces it.","summary":"Keep the worst current winner at the root so a better candidate replaces it.","rule":"Keep the worst current winner at the root so a better candidate replaces it. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.closest-k-heap.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.closest-k-heap.recognize","title":"Bounded Heap for K Closest: When to Use It","concept":"nearest points, closest values, approximate neighbors","summary":"Recognise the problem shape before choosing Bounded Heap for K Closest.","rule":"Squaring preserves the ordering of nonnegative distances. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.closest-k-heap.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.closest-k-heap.challenge","title":"Challenge: Bounded Heap for K Closest","concept":"Return the two points closest to the origin, ordered by distance then coordinates.","summary":"Return the two points closest to the origin, ordered by distance then coordinates.","rule":"Squaring preserves the ordering of nonnegative distances. Return the two points closest to the origin, ordered by distance then coordinates.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.closest-k-heap.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.two-heap-median.model","title":"Median from Two Heaps: Mental Model","concept":"Keep the lower half in a max-heap and upper half in a min-heap with sizes differing by at most one.","summary":"Keep the lower half in a max-heap and upper half in a min-heap with sizes differing by at most one.","rule":"Keep the lower half in a max-heap and the upper half in a min-heap, rebalancing after every insert. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.two-heap-median.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.two-heap-median.recognize","title":"Median from Two Heaps: When to Use It","concept":"online medians and percentile pivots","summary":"Recognise the problem shape before choosing Median from Two Heaps.","rule":"The lower half has either the same size as the upper half or one extra item. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.two-heap-median.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.two-heap-median.challenge","title":"Challenge: Median from Two Heaps","concept":"Return the running median after each inserted value.","summary":"Return the running median after each inserted value.","rule":"The lower half has either the same size as the upper half or one extra item. Return the running median after each inserted value.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.two-heap-median.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.lazy-heap-deletion.model","title":"Lazy Heap Deletion: Mental Model","concept":"Record invalidated values separately and discard stale roots only when they surface.","summary":"Record invalidated values separately and discard stale roots only when they surface.","rule":"Record invalidated values separately and discard stale roots only when they surface. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lazy-heap-deletion.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.lazy-heap-deletion.recognize","title":"Lazy Heap Deletion: When to Use It","concept":"sliding heaps and priority updates without handles","summary":"Recognise the problem shape before choosing Lazy Heap Deletion.","rule":"Heap access does not directly locate arbitrary values. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lazy-heap-deletion.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.lazy-heap-deletion.challenge","title":"Challenge: Lazy Heap Deletion","concept":"Tokens pushN, deleteN and a final min arrive separated by spaces. deleteN removes one occurrence of a value that is live at that moment. Return the smallest live value at min, or none when nothing is live.","summary":"Tokens pushN, deleteN and a final min arrive separated by spaces. deleteN removes one occurrence of a value that is live at that moment. Return the smallest live value at min, or none when nothing is live.","rule":"Heap access does not directly locate arbitrary values. Tokens pushN, deleteN and a final min arrive separated by spaces. deleteN removes one occurrence of a value that is live at that moment. Return the smallest live value at min, or none when nothing is live.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.lazy-heap-deletion.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.priority-scheduling.model","title":"Priority Scheduling: Mental Model","concept":"Order available work by the decision criterion while time controls when work becomes eligible.","summary":"Order available work by the decision criterion while time controls when work becomes eligible.","rule":"Order available work by the decision criterion while time controls when work becomes eligible. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.priority-scheduling.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.priority-scheduling.recognize","title":"Priority Scheduling: When to Use It","concept":"task scheduling, CPU queues, simulation","summary":"Recognise the problem shape before choosing Priority Scheduling.","rule":"Shortest duration, then smallest job ID. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.priority-scheduling.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.priority-scheduling.challenge","title":"Challenge: Priority Scheduling","concept":"Parse unique job IDs with arrival t and positive duration d. Run the shortest available job nonpreemptively, breaking equal durations by smaller ID. Return completion order.","summary":"Parse unique job IDs with arrival t and positive duration d. Run the shortest available job nonpreemptively, breaking equal durations by smaller ID. Return completion order.","rule":"Shortest duration, then smallest job ID. Parse unique job IDs with arrival t and positive duration d. Run the shortest available job nonpreemptively, breaking equal durations by smaller ID. Return completion order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.priority-scheduling.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.meeting-rooms-heap.model","title":"Meeting Rooms Heap: Mental Model","concept":"Sort by start time and reuse the room whose end time is smallest.","summary":"Sort by start time and reuse the room whose end time is smallest.","rule":"Sort by start time and reuse the room whose end time is smallest. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.meeting-rooms-heap.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.meeting-rooms-heap.recognize","title":"Meeting Rooms Heap: When to Use It","concept":"minimum concurrent resources and interval allocation","summary":"Recognise the problem shape before choosing Meeting Rooms Heap.","rule":"For a session starting at t under half-open interval semantics. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.meeting-rooms-heap.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.meeting-rooms-heap.challenge","title":"Challenge: Meeting Rooms Heap","concept":"A room freed at time t can host a meeting starting at t. Return the minimum rooms required.","summary":"A room freed at time t can host a meeting starting at t. Return the minimum rooms required.","rule":"For a session starting at t under half-open interval semantics. A room freed at time t can host a meeting starting at t. Return the minimum rooms required.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.meeting-rooms-heap.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.huffman-greedy-heap.model","title":"Huffman Merge Heap: Mental Model","concept":"Repeatedly merge the two lightest items; the accumulated merge cost is optimal.","summary":"Repeatedly merge the two lightest items; the accumulated merge cost is optimal.","rule":"Repeatedly merge the two lightest items; the accumulated merge cost is optimal. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.huffman-greedy-heap.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.huffman-greedy-heap.recognize","title":"Huffman Merge Heap: When to Use It","concept":"prefix coding and minimum merge cost","summary":"Recognise the problem shape before choosing Huffman Merge Heap.","rule":"It minimizes the additional weighted merge cost. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.huffman-greedy-heap.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-heaps-streaming","id":"algorithm.huffman-greedy-heap.challenge","title":"Challenge: Huffman Merge Heap","concept":"Return the minimum total merge cost.","summary":"Return the minimum total merge cost.","rule":"It minimizes the additional weighted merge cost. Return the minimum total merge cost.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.huffman-greedy-heap.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.adjacency-list.model","title":"Adjacency List: Mental Model","concept":"Store only existing neighbors so traversal cost follows vertices plus edges.","summary":"Store only existing neighbors so traversal cost follows vertices plus edges.","rule":"Store only existing neighbors so traversal cost follows vertices plus edges. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.adjacency-list.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.adjacency-list.recognize","title":"Adjacency List: When to Use It","concept":"sparse graphs, networks, dependency relationships","summary":"Recognise the problem shape before choosing Adjacency List.","rule":"The input graph is undirected. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.adjacency-list.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.adjacency-list.challenge","title":"Challenge: Adjacency List","concept":"Build an undirected adjacency list and return sorted neighbors of node 2.","summary":"Build an undirected adjacency list and return sorted neighbors of node 2.","rule":"The input graph is undirected. Build an undirected adjacency list and return sorted neighbors of node 2.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.adjacency-list.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.graph-dfs.model","title":"Graph DFS: Mental Model","concept":"Explore one branch fully while marking nodes before following outgoing edges.","summary":"Explore one branch fully while marking nodes before following outgoing edges.","rule":"Explore one branch fully while marking nodes before following outgoing edges. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.graph-dfs.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.graph-dfs.recognize","title":"Graph DFS: When to Use It","concept":"reachability, components, path existence","summary":"Recognise the problem shape before choosing Graph DFS.","rule":"The required traversal uses ascending neighbors. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.graph-dfs.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.graph-dfs.challenge","title":"Challenge: Graph DFS","concept":"Edges are undirected, and vertices run from 0 to the largest endpoint. Return recursive DFS order from node 0 using ascending neighbors.","summary":"Edges are undirected, and vertices run from 0 to the largest endpoint. Return recursive DFS order from node 0 using ascending neighbors.","rule":"The required traversal uses ascending neighbors. Edges are undirected, and vertices run from 0 to the largest endpoint. Return recursive DFS order from node 0 using ascending neighbors.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.graph-dfs.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.graph-bfs.model","title":"Graph BFS: Mental Model","concept":"Process the frontier in queue order so first discovery has minimum edge count.","summary":"Process the frontier in queue order so first discovery has minimum edge count.","rule":"Process the frontier in queue order so first discovery has minimum edge count. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.graph-bfs.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.graph-bfs.recognize","title":"Graph BFS: When to Use It","concept":"unweighted shortest paths and layer expansion","summary":"Recognise the problem shape before choosing Graph BFS.","rule":"The first discovered BFS route is shortest in an unweighted graph. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.graph-bfs.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.graph-bfs.challenge","title":"Challenge: Graph BFS","concept":"Parse n and undirected edges. Return the distance in edges from node 0 to every node in vertex order, or -1 for an unreachable node.","summary":"Parse n and undirected edges. Return the distance in edges from node 0 to every node in vertex order, or -1 for an unreachable node.","rule":"The first discovered BFS route is shortest in an unweighted graph. Parse n and undirected edges. Return the distance in edges from node 0 to every node in vertex order, or -1 for an unreachable node.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.graph-bfs.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.connected-components.model","title":"Connected Components: Mental Model","concept":"Start a traversal from every still-unseen node and count starts.","summary":"Start a traversal from every still-unseen node and count starts.","rule":"Start a traversal from every still-unseen node and count starts. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.connected-components.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.connected-components.recognize","title":"Connected Components: When to Use It","concept":"islands, clusters, disconnected networks","summary":"Recognise the problem shape before choosing Connected Components.","rule":"One start cannot reach components separated from it. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.connected-components.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.connected-components.challenge","title":"Challenge: Connected Components","concept":"Parse n and undirected edges; edges= with nothing after it and edges=none both mean no edges. Return the number of connected components, counting isolated vertices.","summary":"Parse n and undirected edges; edges= with nothing after it and edges=none both mean no edges. Return the number of connected components, counting isolated vertices.","rule":"One start cannot reach components separated from it. Parse n and undirected edges; edges= with nothing after it and edges=none both mean no edges. Return the number of connected components, counting isolated vertices.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.connected-components.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.grid-flood-fill.model","title":"Grid Flood Fill: Mental Model","concept":"Treat cells as graph nodes and traverse only neighbors satisfying the region predicate.","summary":"Treat cells as graph nodes and traverse only neighbors satisfying the region predicate.","rule":"Treat cells as graph nodes and traverse only neighbors satisfying the region predicate. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.grid-flood-fill.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.grid-flood-fill.recognize","title":"Grid Flood Fill: When to Use It","concept":"islands, image fill, maze regions","summary":"Recognise the problem shape before choosing Grid Flood Fill.","rule":"Four orthogonal moves to equal-valued cells. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.grid-flood-fill.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.grid-flood-fill.challenge","title":"Challenge: Grid Flood Fill","concept":"Return the size of the component containing row 1 column 1.","summary":"Return the size of the component containing row 1 column 1.","rule":"Four orthogonal moves to equal-valued cells. Return the size of the component containing row 1 column 1.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.grid-flood-fill.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.bipartite-coloring.model","title":"Bipartite Coloring: Mental Model","concept":"Assign opposite colors across every edge and reject any edge whose endpoints match.","summary":"Assign opposite colors across every edge and reject any edge whose endpoints match.","rule":"Assign opposite colors across every edge while traversing each component. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bipartite-coloring.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.bipartite-coloring.recognize","title":"Bipartite Coloring: When to Use It","concept":"two-team constraints and odd-cycle detection","summary":"Recognise the problem shape before choosing Bipartite Coloring.","rule":"An edge joins two vertices assigned the same color. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bipartite-coloring.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.bipartite-coloring.challenge","title":"Challenge: Bipartite Coloring","concept":"Parse n and undirected edges; the graph may be disconnected. Return whether it can be two-colored.","summary":"Parse n and undirected edges; the graph may be disconnected. Return whether it can be two-colored.","rule":"An edge joins two vertices assigned the same color. Parse n and undirected edges; the graph may be disconnected. Return whether it can be two-colored.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bipartite-coloring.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.undirected-cycle.model","title":"Undirected Cycle Detection: Mental Model","concept":"During traversal ignore the edge back to the parent; any other seen neighbor closes a cycle.","summary":"During traversal ignore the edge back to the parent; any other seen neighbor closes a cycle.","rule":"During traversal ignore the edge back to the parent; any other seen neighbor closes a cycle. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.undirected-cycle.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.undirected-cycle.recognize","title":"Undirected Cycle Detection: When to Use It","concept":"valid-tree checks and redundant connections","summary":"Recognise the problem shape before choosing Undirected Cycle Detection.","rule":"That edge is the reverse view of the tree edge just followed. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.undirected-cycle.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.undirected-cycle.challenge","title":"Challenge: Undirected Cycle Detection","concept":"Edges are undirected, and vertices run from 0 to the largest endpoint; the graph may be disconnected and has no self-loops or parallel edges. Return whether it contains a cycle.","summary":"Edges are undirected, and vertices run from 0 to the largest endpoint; the graph may be disconnected and has no self-loops or parallel edges. Return whether it contains a cycle.","rule":"That edge is the reverse view of the tree edge just followed. Edges are undirected, and vertices run from 0 to the largest endpoint; the graph may be disconnected and has no self-loops or parallel edges. Return whether it contains a cycle.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.undirected-cycle.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.kahn-topological.model","title":"Kahn Topological Sort: Mental Model","concept":"Repeatedly remove zero-indegree nodes and decrement dependents; leftovers prove a cycle.","summary":"Repeatedly remove zero-indegree nodes and decrement dependents; leftovers prove a cycle.","rule":"Repeatedly remove zero-indegree nodes and decrement dependents; leftovers prove a cycle. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kahn-topological.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.kahn-topological.recognize","title":"Kahn Topological Sort: When to Use It","concept":"course schedules and build dependency order","summary":"Recognise the problem shape before choosing Kahn Topological Sort.","rule":"The task requires the lexicographically smallest valid ordering. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kahn-topological.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.kahn-topological.challenge","title":"Challenge: Kahn Topological Sort","concept":"Parse n and directed edges a->b. Return the lexicographically smallest valid topological order.","summary":"Parse n and directed edges a->b. Return the lexicographically smallest valid topological order.","rule":"The task requires the lexicographically smallest valid ordering. Parse n and directed edges a->b. Return the lexicographically smallest valid topological order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.kahn-topological.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.dfs-topological.model","title":"DFS Topological Sort: Mental Model","concept":"Append a node after all descendants; a gray-to-gray edge proves a directed cycle.","summary":"Append a node after all descendants; a gray-to-gray edge proves a directed cycle.","rule":"Append a node after all descendants; a gray-to-gray edge proves a directed cycle. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dfs-topological.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.dfs-topological.recognize","title":"DFS Topological Sort: When to Use It","concept":"dependency ordering and cycle diagnosis","summary":"Recognise the problem shape before choosing DFS Topological Sort.","rule":"Each dependency's traversal finishes before its predecessor is appended. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dfs-topological.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.dfs-topological.challenge","title":"Challenge: DFS Topological Sort","concept":"Parse n and directed edges a->b. Run DFS from vertices in ascending order, visit each vertex's neighbors in ascending order, and return the reverse of the finishing order.","summary":"Parse n and directed edges a->b. Run DFS from vertices in ascending order, visit each vertex's neighbors in ascending order, and return the reverse of the finishing order.","rule":"Each dependency's traversal finishes before its predecessor is appended. Parse n and directed edges a->b. Run DFS from vertices in ascending order, visit each vertex's neighbors in ascending order, and return the reverse of the finishing order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dfs-topological.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.strong-components.model","title":"Strongly Connected Components: Mental Model","concept":"Use finish order plus reversed edges, or low links, to collapse mutual reachability.","summary":"Use finish order plus reversed edges, or low links, to collapse mutual reachability.","rule":"Use finish order plus reversed edges, or low links, to collapse mutual reachability. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.strong-components.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.strong-components.recognize","title":"Strongly Connected Components: When to Use It","concept":"dependency cycles, graph condensation, state machines","summary":"Recognise the problem shape before choosing Strongly Connected Components.","rule":"It isolates maximal mutually reachable vertex groups. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.strong-components.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-graph-traversal","id":"algorithm.strong-components.challenge","title":"Challenge: Strongly Connected Components","concept":"Parse directed edges with vertices 0..maximum endpoint. Return SCCs with sorted members, and sort the component lists lexicographically; separate components with semicolons.","summary":"Parse directed edges with vertices 0..maximum endpoint. Return SCCs with sorted members, and sort the component lists lexicographically; separate components with semicolons.","rule":"It isolates maximal mutually reachable vertex groups. Parse directed edges with vertices 0..maximum endpoint. Return SCCs with sorted members, and sort the component lists lexicographically; separate components with semicolons.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.strong-components.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dijkstra.model","title":"Dijkstra: Mental Model","concept":"Finalize the smallest tentative distance and relax its non-negative outgoing edges.","summary":"Finalize the smallest tentative distance and relax its non-negative outgoing edges.","rule":"Finalize the smallest tentative distance and relax its non-negative outgoing edges. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dijkstra.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dijkstra.recognize","title":"Dijkstra: When to Use It","concept":"single-source shortest paths with non-negative weights","summary":"Recognise the problem shape before choosing Dijkstra.","rule":"It is a stale entry superseded by a shorter route. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dijkstra.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dijkstra.challenge","title":"Challenge: Dijkstra","concept":"Edges a-b:w are undirected with nonnegative weights, and vertices run from 0 to the largest endpoint. Return shortest distances from node 0 in vertex order, or -1 for an unreachable node.","summary":"Edges a-b:w are undirected with nonnegative weights, and vertices run from 0 to the largest endpoint. Return shortest distances from node 0 in vertex order, or -1 for an unreachable node.","rule":"It is a stale entry superseded by a shorter route. Edges a-b:w are undirected with nonnegative weights, and vertices run from 0 to the largest endpoint. Return shortest distances from node 0 in vertex order, or -1 for an unreachable node.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dijkstra.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.zero-one-bfs.model","title":"0–1 BFS: Mental Model","concept":"Push zero-cost edges to the deque front and unit-cost edges to the back.","summary":"Push zero-cost edges to the deque front and unit-cost edges to the back.","rule":"Push zero-cost edges to the deque front and unit-cost edges to the back. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.zero-one-bfs.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.zero-one-bfs.recognize","title":"0–1 BFS: When to Use It","concept":"shortest paths with weights only 0 or 1","summary":"Recognise the problem shape before choosing 0–1 BFS.","rule":"It stays in the current distance layer. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.zero-one-bfs.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.zero-one-bfs.challenge","title":"Challenge: 0–1 BFS","concept":"Edges a-b:w are undirected with weight 0 or 1. Return the minimum cost from 0 to 3.","summary":"Edges a-b:w are undirected with weight 0 or 1. Return the minimum cost from 0 to 3.","rule":"It stays in the current distance layer. Edges a-b:w are undirected with weight 0 or 1. Return the minimum cost from 0 to 3.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.zero-one-bfs.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dag-shortest-path.model","title":"DAG Shortest Path: Mental Model","concept":"Relax outgoing edges once in topological order because no path can return to an earlier node.","summary":"Relax outgoing edges once in topological order because no path can return to an earlier node.","rule":"Relax outgoing edges once in topological order because no path can return to an earlier node. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dag-shortest-path.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dag-shortest-path.recognize","title":"DAG Shortest Path: When to Use It","concept":"weighted acyclic dependency graphs","summary":"Recognise the problem shape before choosing DAG Shortest Path.","rule":"Topological order processes every predecessor before its outgoing relaxations. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dag-shortest-path.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dag-shortest-path.challenge","title":"Challenge: DAG Shortest Path","concept":"Edges a->b:w form a directed acyclic graph and may be negative. Return the shortest distance from 0 to 4.","summary":"Edges a->b:w form a directed acyclic graph and may be negative. Return the shortest distance from 0 to 4.","rule":"Topological order processes every predecessor before its outgoing relaxations. Edges a->b:w form a directed acyclic graph and may be negative. Return the shortest distance from 0 to 4.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dag-shortest-path.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.prim-mst.model","title":"Prim Minimum Spanning Tree: Mental Model","concept":"Grow one connected tree by repeatedly choosing the cheapest edge crossing its boundary.","summary":"Grow one connected tree by repeatedly choosing the cheapest edge crossing its boundary.","rule":"Grow one connected tree by repeatedly choosing the cheapest edge crossing its boundary. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prim-mst.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.prim-mst.recognize","title":"Prim Minimum Spanning Tree: When to Use It","concept":"minimum network wiring from a connected weighted graph","summary":"Recognise the problem shape before choosing Prim Minimum Spanning Tree.","rule":"Edges crossing from the visited set to an unvisited vertex. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.prim-mst.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.prim-mst.challenge","title":"Challenge: Prim Minimum Spanning Tree","concept":"Return the MST total weight.","summary":"Return the MST total weight.","rule":"Edges crossing from the visited set to an unvisited vertex. Return the MST total weight.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.prim-mst.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.kruskal-mst.model","title":"Kruskal Minimum Spanning Tree: Mental Model","concept":"Sort edges and add one only when union-find says it joins different components.","summary":"Sort edges and add one only when union-find says it joins different components.","rule":"Sort edges and add one only when union-find says it joins different components. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kruskal-mst.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.kruskal-mst.recognize","title":"Kruskal Minimum Spanning Tree: When to Use It","concept":"minimum spanning trees of connected graphs and sparse edge lists","summary":"Recognise the problem shape before choosing Kruskal Minimum Spanning Tree.","rule":"Adding it would create a cycle in the selected forest. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kruskal-mst.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.kruskal-mst.challenge","title":"Challenge: Kruskal Minimum Spanning Tree","concept":"The undirected graph on vertices 0 to the largest endpoint is connected. Return the weights of the edges Kruskal selects, in selection order: ascending weight, ties by smaller endpoints.","summary":"The undirected graph on vertices 0 to the largest endpoint is connected. Return the weights of the edges Kruskal selects, in selection order: ascending weight, ties by smaller endpoints.","rule":"Adding it would create a cycle in the selected forest. The undirected graph on vertices 0 to the largest endpoint is connected. Return the weights of the edges Kruskal selects, in selection order: ascending weight, ties by smaller endpoints.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.kruskal-mst.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.bellman-ford.model","title":"Bellman–Ford: Mental Model","concept":"Relax every edge V-1 times; an improvement on the next pass proves a reachable negative cycle.","summary":"Relax every edge V-1 times; an improvement on the next pass proves a reachable negative cycle.","rule":"Relax every edge V-1 times, because a shortest simple path has at most V-1 edges. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bellman-ford.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.bellman-ford.recognize","title":"Bellman–Ford: When to Use It","concept":"negative edges and negative-cycle detection","summary":"Recognise the problem shape before choosing Bellman–Ford.","rule":"A negative cycle reachable from the source. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bellman-ford.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.bellman-ford.challenge","title":"Challenge: Bellman–Ford","concept":"Edges a->b:w are directed and may be negative, with no reachable negative cycle, and they arrive in any order; vertices run from 0 to the largest endpoint. Return shortest distances from 0 in vertex order, or -1 for an unreachable vertex.","summary":"Edges a->b:w are directed and may be negative, with no reachable negative cycle, and they arrive in any order; vertices run from 0 to the largest endpoint. Return shortest distances from 0 in vertex order, or -1 for an unreachable vertex.","rule":"A negative cycle reachable from the source. Edges a->b:w are directed and may be negative, with no reachable negative cycle, and they arrive in any order; vertices run from 0 to the largest endpoint. Return shortest distances from 0 in vertex order, or -1 for an unreachable vertex.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bellman-ford.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.floyd-warshall.model","title":"Floyd–Warshall: Mental Model","concept":"Allow intermediate vertices one by one and combine paths through the newly allowed vertex.","summary":"Allow intermediate vertices one by one and combine paths through the newly allowed vertex.","rule":"Allow intermediate vertices one by one and combine paths through the newly allowed vertex. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.floyd-warshall.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.floyd-warshall.recognize","title":"Floyd–Warshall: When to Use It","concept":"all-pairs shortest paths on small dense graphs","summary":"Recognise the problem shape before choosing Floyd–Warshall.","rule":"Paths whose internal vertices belong to the processed prefix. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.floyd-warshall.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.floyd-warshall.challenge","title":"Challenge: Floyd–Warshall","concept":"Matrix entries are directed edge weights and inf means no edge. Return the shortest distance from 0 to 2.","summary":"Matrix entries are directed edge weights and inf means no edge. Return the shortest distance from 0 to 2.","rule":"Paths whose internal vertices belong to the processed prefix. Matrix entries are directed edge weights and inf means no edge. Return the shortest distance from 0 to 2.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.floyd-warshall.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.a-star.model","title":"A* Search: Mental Model","concept":"Prioritize distance-so-far plus an admissible estimate that never overstates remaining cost.","summary":"Prioritize distance-so-far plus an admissible estimate that never overstates remaining cost.","rule":"Prioritize distance-so-far plus an admissible estimate that never overstates remaining cost. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.a-star.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.a-star.recognize","title":"A* Search: When to Use It","concept":"goal-directed pathfinding with useful geometry","summary":"Recognise the problem shape before choosing A* Search.","rule":"It never exceeds the remaining number of unit orthogonal moves. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.a-star.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.a-star.challenge","title":"Challenge: A* Search","concept":"On a 4x4 grid, coordinates are row,col and optional walls=(r,c),... lists cells that cannot be entered. Return the fewest four-neighbor moves from start to goal using A* with the Manhattan heuristic, or -1 when walls block every route.","summary":"On a 4x4 grid, coordinates are row,col and optional walls=(r,c),... lists cells that cannot be entered. Return the fewest four-neighbor moves from start to goal using A* with the Manhattan heuristic, or -1 when walls block every route.","rule":"It never exceeds the remaining number of unit orthogonal moves. On a 4x4 grid, coordinates are row,col and optional walls=(r,c),... lists cells that cannot be entered. Return the fewest four-neighbor moves from start to goal using A* with the Manhattan heuristic, or -1 when walls block every route.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.a-star.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.bidirectional-bfs.model","title":"Bidirectional BFS: Mental Model","concept":"Expand the smaller frontier from each endpoint until the visited sets meet.","summary":"Expand the smaller frontier from each endpoint until the visited sets meet.","rule":"Expand the smaller frontier from each endpoint until the visited sets meet. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bidirectional-bfs.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.bidirectional-bfs.recognize","title":"Bidirectional BFS: When to Use It","concept":"unweighted shortest paths with one source and one target","summary":"Recognise the problem shape before choosing Bidirectional BFS.","rule":"Layer distances remain meaningful when the two searches meet. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bidirectional-bfs.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.bidirectional-bfs.challenge","title":"Challenge: Bidirectional BFS","concept":"Return the number of words in the shortest ladder from start to goal, counting both ends and changing one letter at a time. Every word after start must be in the list, including goal. Return 0 when goal is absent from the list or no ladder exists.","summary":"Return the number of words in the shortest ladder from start to goal, counting both ends and changing one letter at a time. Every word after start must be in the list, including goal. Return 0 when goal is absent from the list or no ladder exists.","rule":"Layer distances remain meaningful when the two searches meet. Return the number of words in the shortest ladder from start to goal, counting both ends and changing one letter at a time. Every word after start must be in the list, including goal. Return 0 when goal is absent from the list or no ladder exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bidirectional-bfs.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dinic-max-flow.model","title":"Dinic Maximum Flow: Mental Model","concept":"Build a level graph with BFS and send blocking flows through level-respecting edges.","summary":"Build a level graph with BFS and send blocking flows through level-respecting edges.","rule":"Build a level graph with BFS and send blocking flows through level-respecting edges. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dinic-max-flow.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dinic-max-flow.recognize","title":"Dinic Maximum Flow: When to Use It","concept":"capacity networks, matching, assignment","summary":"Recognise the problem shape before choosing Dinic Maximum Flow.","rule":"Later augmentations may undo and reroute earlier choices. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dinic-max-flow.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-weighted-graphs","id":"algorithm.dinic-max-flow.challenge","title":"Challenge: Dinic Maximum Flow","concept":"Edges a->b:c are directed with capacity c. Return the maximum flow from 0 to 3.","summary":"Edges a->b:c are directed with capacity c. Return the maximum flow from 0 to 3.","rule":"Later augmentations may undo and reroute earlier choices. Edges a->b:c are directed with capacity c. Return the maximum flow from 0 to 3.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dinic-max-flow.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.subsets.model","title":"Subset Generation: Mental Model","concept":"At each item branch on exclude or include, or extend every current subset.","summary":"At each item branch on exclude or include, or extend every current subset.","rule":"At each item branch on exclude or include, or extend every current subset. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.subsets.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.subsets.recognize","title":"Subset Generation: When to Use It","concept":"power sets and optional choices","summary":"Recognise the problem shape before choosing Subset Generation.","rule":"Mask 3, with both low bits set. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.subsets.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.subsets.challenge","title":"Challenge: Subset Generation","concept":"Return subsets in bitmask order.","summary":"Return subsets in bitmask order.","rule":"Mask 3, with both low bits set. Return subsets in bitmask order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.subsets.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.permutations.model","title":"Permutation Backtracking: Mental Model","concept":"Choose one unused item for the next position, recurse, then mark it unused again.","summary":"Choose one unused item for the next position, recurse, then mark it unused again.","rule":"Choose one unused item for the next position, recurse, then mark it unused again. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.permutations.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.permutations.recognize","title":"Permutation Backtracking: When to Use It","concept":"orderings and assignment sequences","summary":"Recognise the problem shape before choosing Permutation Backtracking.","rule":"Each position needs a distinct input item while sibling branches reuse available choices. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.permutations.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.permutations.challenge","title":"Challenge: Permutation Backtracking","concept":"Given [...], return the number of permutations of the distinct items, counting one empty permutation for an empty list. Given list=[...], return every permutation instead, trying unused input positions left to right, with commas within a permutation and semicolons between them.","summary":"Given [...], return the number of permutations of the distinct items, counting one empty permutation for an empty list. Given list=[...], return every permutation instead, trying unused input positions left to right, with commas within a permutation and semicolons between them.","rule":"Each position needs a distinct input item while sibling branches reuse available choices. Given [...], return the number of permutations of the distinct items, counting one empty permutation for an empty list. Given list=[...], return every permutation instead, trying unused input positions left to right, with commas within a permutation and semicolons between them.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.permutations.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.combinations.model","title":"Combination Backtracking: Mental Model","concept":"Advance the start index so order does not create duplicate selections.","summary":"Advance the start index so order does not create duplicate selections.","rule":"Advance the start index so order does not create duplicate selections. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.combinations.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.combinations.recognize","title":"Combination Backtracking: When to Use It","concept":"choose-k sets and teams","summary":"Recognise the problem shape before choosing Combination Backtracking.","rule":"It prevents reuse and eliminates order-equivalent selections. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.combinations.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.combinations.challenge","title":"Challenge: Combination Backtracking","concept":"The values are in strictly ascending order. Return all size-two combinations in lexicographic order, or an empty string when fewer than two values exist.","summary":"The values are in strictly ascending order. Return all size-two combinations in lexicographic order, or an empty string when fewer than two values exist.","rule":"It prevents reuse and eliminates order-equivalent selections. The values are in strictly ascending order. Return all size-two combinations in lexicographic order, or an empty string when fewer than two values exist.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.combinations.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.combination-sum.model","title":"Combination Sum: Mental Model","concept":"Choose a candidate again or move forward while pruning when the remaining target is negative.","summary":"Choose a candidate again or move forward while pruning when the remaining target is negative.","rule":"Choose a candidate again or move forward while pruning when the remaining target is negative. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.combination-sum.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.combination-sum.recognize","title":"Combination Sum: When to Use It","concept":"unbounded sum construction and coin-like enumeration","summary":"Recognise the problem shape before choosing Combination Sum.","rule":"The task allows that candidate to be used repeatedly. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.combination-sum.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.combination-sum.challenge","title":"Challenge: Combination Sum","concept":"Return the unique nondecreasing combinations summing to 7, commas within a combination and semicolons between them, in ascending lexicographic order. A candidate may repeat within a combination. Return an empty string when none exists.","summary":"Return the unique nondecreasing combinations summing to 7, commas within a combination and semicolons between them, in ascending lexicographic order. A candidate may repeat within a combination. Return an empty string when none exists.","rule":"The task allows that candidate to be used repeatedly. Return the unique nondecreasing combinations summing to 7, commas within a combination and semicolons between them, in ascending lexicographic order. A candidate may repeat within a combination. Return an empty string when none exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.combination-sum.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.parentheses-generation.model","title":"Valid Parentheses Generation: Mental Model","concept":"Add an open symbol while available and a close only when it cannot exceed opens used.","summary":"Add an open symbol while available and a close only when it cannot exceed opens used.","rule":"Add an open symbol while available and a close only when it cannot exceed opens used. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.parentheses-generation.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.parentheses-generation.recognize","title":"Valid Parentheses Generation: When to Use It","concept":"balanced sequence construction","summary":"Recognise the problem shape before choosing Valid Parentheses Generation.","rule":"No prefix may contain more closes than opens. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.parentheses-generation.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.parentheses-generation.challenge","title":"Challenge: Valid Parentheses Generation","concept":"Return valid sequences for three pairs in lexicographic order.","summary":"Return valid sequences for three pairs in lexicographic order.","rule":"No prefix may contain more closes than opens. Return valid sequences for three pairs in lexicographic order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.parentheses-generation.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.word-grid-search.model","title":"Grid Word Search: Mental Model","concept":"Walk matching neighbors while temporarily marking the current cell unavailable in this path.","summary":"Walk matching neighbors while temporarily marking the current cell unavailable in this path.","rule":"Walk matching neighbors while temporarily marking the current cell unavailable in this path. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.word-grid-search.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.word-grid-search.recognize","title":"Grid Word Search: When to Use It","concept":"path spelling and local grid constraints","summary":"Recognise the problem shape before choosing Grid Word Search.","rule":"A sibling path may legally reuse that cell. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.word-grid-search.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.word-grid-search.challenge","title":"Challenge: Grid Word Search","concept":"Parse a rectangular ASCII grid and word. Return whether four-neighbor moves spell the word without reusing a cell within one path.","summary":"Parse a rectangular ASCII grid and word. Return whether four-neighbor moves spell the word without reusing a cell within one path.","rule":"A sibling path may legally reuse that cell. Parse a rectangular ASCII grid and word. Return whether four-neighbor moves spell the word without reusing a cell within one path.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.word-grid-search.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.palindrome-partition.model","title":"Palindrome Partitioning: Mental Model","concept":"Choose each palindromic prefix as the next piece and recurse on the remaining suffix.","summary":"Choose each palindromic prefix as the next piece and recurse on the remaining suffix.","rule":"Choose each palindromic prefix as the next piece and recurse on the remaining suffix. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.palindrome-partition.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.palindrome-partition.recognize","title":"Palindrome Partitioning: When to Use It","concept":"string segmentation under a local validity rule","summary":"Recognise the problem shape before choosing Palindrome Partitioning.","rule":"Every segment of a valid partition must itself be palindromic. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.palindrome-partition.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.palindrome-partition.challenge","title":"Challenge: Palindrome Partitioning","concept":"Return the number of palindrome partitions.","summary":"Return the number of palindrome partitions.","rule":"Every segment of a valid partition must itself be palindromic. Return the number of palindrome partitions.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.palindrome-partition.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.n-queens.model","title":"N-Queens: Mental Model","concept":"Place one queen per row and reject occupied columns and both diagonals before recursing.","summary":"Place one queen per row and reject occupied columns and both diagonals before recursing.","rule":"Place one queen per row and reject any square an earlier queen attacks before recursing. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.n-queens.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.n-queens.recognize","title":"N-Queens: When to Use It","concept":"constraint satisfaction with compact conflict sets","summary":"Recognise the problem shape before choosing N-Queens.","rule":"Her column and both diagonals are unused. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.n-queens.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.n-queens.challenge","title":"Challenge: N-Queens","concept":"Parse n and return the number of placements of n non-attacking queens on an n-by-n board. Count the empty placement once for n=0.","summary":"Parse n and return the number of placements of n non-attacking queens on an n-by-n board. Count the empty placement once for n=0.","rule":"Her column and both diagonals are unused. Parse n and return the number of placements of n non-attacking queens on an n-by-n board. Count the empty placement once for n=0.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.n-queens.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.sudoku.model","title":"Sudoku Constraint Search: Mental Model","concept":"Choose an empty cell, try allowed symbols, and undo; picking the fewest candidates prunes harder.","summary":"Choose an empty cell, try allowed symbols, and undo; picking the fewest candidates prunes harder.","rule":"Choose an empty cell, try allowed symbols, and undo; picking the fewest candidates prunes harder. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sudoku.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.sudoku.recognize","title":"Sudoku Constraint Search: When to Use It","concept":"exact constraint completion","summary":"Recognise the problem shape before choosing Sudoku Constraint Search.","rule":"The parent board state must be restored before trying another digit. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sudoku.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.sudoku.challenge","title":"Challenge: Sudoku Constraint Search","concept":"Two input forms. row0=... is the first row of a valid solved board with one digit replaced by a dot: return that digit. board=... lists 81 cells row by row, with dots for blanks and exactly one solution: return the solved board as 81 digits.","summary":"Two input forms. row0=... is the first row of a valid solved board with one digit replaced by a dot: return that digit. board=... lists 81 cells row by row, with dots for blanks and exactly one solution: return the solved board as 81 digits.","rule":"The parent board state must be restored before trying another digit. Two input forms. row0=... is the first row of a valid solved board with one digit replaced by a dot: return that digit. board=... lists 81 cells row by row, with dots for blanks and exactly one solution: return the solved board as 81 digits.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.sudoku.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.meet-in-middle.model","title":"Meet in the Middle: Mental Model","concept":"Enumerate two half-spaces and combine their summaries instead of exploring the full product directly.","summary":"Enumerate two half-spaces and combine their summaries instead of exploring the full product directly.","rule":"Enumerate two half-spaces and combine their summaries instead of exploring the full product directly. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.meet-in-middle.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.meet-in-middle.recognize","title":"Meet in the Middle: When to Use It","concept":"subset sum around 40 items and split exhaustive search","summary":"Recognise the problem shape before choosing Meet in the Middle.","rule":"Each half has about 2^(n/2) subsets and complementary sums can be matched. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.meet-in-middle.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-backtracking","id":"algorithm.meet-in-middle.challenge","title":"Challenge: Meet in the Middle","concept":"Return whether a subset sums to 15.","summary":"Return whether a subset sums to 15.","rule":"Each half has about 2^(n/2) subsets and complementary sums can be matched. Return whether a subset sums to 15.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.meet-in-middle.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.activity-selection.model","title":"Activity Selection: Mental Model","concept":"Choose the compatible interval that finishes earliest, leaving maximum room for the future.","summary":"Choose the compatible interval that finishes earliest, leaving maximum room for the future.","rule":"Choose the compatible interval that finishes earliest, leaving maximum room for the future. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.activity-selection.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.activity-selection.recognize","title":"Activity Selection: When to Use It","concept":"maximum count of non-overlapping jobs","summary":"Recognise the problem shape before choosing Activity Selection.","rule":"It leaves the most remaining time without reducing achievable count. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.activity-selection.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.activity-selection.challenge","title":"Challenge: Activity Selection","concept":"The meetings may arrive in any order, and one ending at t is compatible with one starting at t. Return the maximum number of compatible meetings.","summary":"The meetings may arrive in any order, and one ending at t is compatible with one starting at t. Return the maximum number of compatible meetings.","rule":"It leaves the most remaining time without reducing achievable count. The meetings may arrive in any order, and one ending at t is compatible with one starting at t. Return the maximum number of compatible meetings.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.activity-selection.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.merge-intervals.model","title":"Merge Intervals: Mental Model","concept":"Sort by start and extend the current interval while the next one overlaps.","summary":"Sort by start and extend the current interval while the next one overlaps.","rule":"Sort by start and extend the current interval while the next one overlaps. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.merge-intervals.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.merge-intervals.recognize","title":"Merge Intervals: When to Use It","concept":"calendar consolidation and covered ranges","summary":"Recognise the problem shape before choosing Merge Intervals.","rule":"Any next overlap can only extend the last emitted interval. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.merge-intervals.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.merge-intervals.challenge","title":"Challenge: Merge Intervals","concept":"The closed intervals may arrive unsorted. Return them merged in ascending order; touching endpoints merge.","summary":"The closed intervals may arrive unsorted. Return them merged in ascending order; touching endpoints merge.","rule":"Any next overlap can only extend the last emitted interval. The closed intervals may arrive unsorted. Return them merged in ascending order; touching endpoints merge.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.merge-intervals.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.insert-interval.model","title":"Insert into Sorted Intervals: Mental Model","concept":"Copy intervals before, merge every overlap, then copy intervals after.","summary":"Copy intervals before, merge every overlap, then copy intervals after.","rule":"Copy intervals before, merge every overlap, then copy intervals after. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.insert-interval.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.insert-interval.recognize","title":"Insert into Sorted Intervals: When to Use It","concept":"adding one booking to an already normalised schedule","summary":"Recognise the problem shape before choosing Insert into Sorted Intervals.","rule":"Prefix, overlap region and suffix can each be scanned once. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.insert-interval.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.insert-interval.challenge","title":"Challenge: Insert into Sorted Intervals","concept":"Insert [4,8] and return merged intervals.","summary":"Insert [4,8] and return merged intervals.","rule":"Prefix, overlap region and suffix can each be scanned once. Insert [4,8] and return merged intervals.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.insert-interval.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.sweep-line-events.model","title":"Sweep-Line Events: Mental Model","concept":"Sort starts and ends as signed events and integrate active state across coordinates.","summary":"Sort starts and ends as signed events and integrate active state across coordinates.","rule":"Sort starts and ends as signed events and integrate active state across coordinates. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sweep-line-events.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.sweep-line-events.recognize","title":"Sweep-Line Events: When to Use It","concept":"overlap counts, skyline changes, resource demand","summary":"Recognise the problem shape before choosing Sweep-Line Events.","rule":"Sessions use half-open intervals and an ending slot is reusable immediately. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sweep-line-events.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.sweep-line-events.challenge","title":"Challenge: Sweep-Line Events","concept":"Return maximum simultaneous sessions; process ends before starts at equal time.","summary":"Return maximum simultaneous sessions; process ends before starts at equal time.","rule":"Sessions use half-open intervals and an ending slot is reusable immediately. Return maximum simultaneous sessions; process ends before starts at equal time.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.sweep-line-events.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.jump-game.model","title":"Greedy Reach Frontier: Mental Model","concept":"Maintain the farthest reachable index and fail only when the scan moves beyond it.","summary":"Maintain the farthest reachable index and fail only when the scan moves beyond it.","rule":"Maintain the farthest reachable index and fail only when the scan moves beyond it. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.jump-game.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.jump-game.recognize","title":"Greedy Reach Frontier: When to Use It","concept":"reachability with forward jump capacity","summary":"Recognise the problem shape before choosing Greedy Reach Frontier.","rule":"The greatest index reachable using the inspected positions. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.jump-game.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.jump-game.challenge","title":"Challenge: Greedy Reach Frontier","concept":"Return whether the final index is reachable.","summary":"Return whether the final index is reachable.","rule":"The greatest index reachable using the inspected positions. Return whether the final index is reachable.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.jump-game.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.jump-game-two.model","title":"Greedy Layered Jumps: Mental Model","concept":"Treat the current reach as a BFS layer and commit a jump when the scan reaches its boundary.","summary":"Treat the current reach as a BFS layer and commit a jump when the scan reaches its boundary.","rule":"Treat the current reach as a BFS layer and commit a jump when the scan reaches its boundary. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.jump-game-two.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.jump-game-two.recognize","title":"Greedy Layered Jumps: When to Use It","concept":"minimum jumps in forward-reach arrays","summary":"Recognise the problem shape before choosing Greedy Layered Jumps.","rule":"All positions reachable with that many jumps have contributed their next frontier. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.jump-game-two.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.jump-game-two.challenge","title":"Challenge: Greedy Layered Jumps","concept":"Return the minimum jumps to the final index, or -1 when it is unreachable.","summary":"Return the minimum jumps to the final index, or -1 when it is unreachable.","rule":"All positions reachable with that many jumps have contributed their next frontier. Return the minimum jumps to the final index, or -1 when it is unreachable.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.jump-game-two.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.gas-station.model","title":"Gas Station Reset: Mental Model","concept":"When running fuel becomes negative, no station in that failed segment can be a valid start.","summary":"When running fuel becomes negative, no station in that failed segment can be a valid start.","rule":"When running fuel becomes negative, no station in that failed segment can be a valid start. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.gas-station.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.gas-station.recognize","title":"Gas Station Reset: When to Use It","concept":"circular feasibility with cumulative gain","summary":"Recognise the problem shape before choosing Gas Station Reset.","rule":"Starting later inside that negative-prefix segment cannot repair the already established deficit. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.gas-station.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.gas-station.challenge","title":"Challenge: Gas Station Reset","concept":"Return the smallest valid starting station, or -1 when no start completes the circuit.","summary":"Return the smallest valid starting station, or -1 when no start completes the circuit.","rule":"Starting later inside that negative-prefix segment cannot repair the already established deficit. Return the smallest valid starting station, or -1 when no start completes the circuit.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.gas-station.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.partition-labels.model","title":"Last-Occurrence Partition: Mental Model","concept":"Extend the current segment to the farthest last occurrence of every symbol encountered.","summary":"Extend the current segment to the farthest last occurrence of every symbol encountered.","rule":"Extend the current segment to the farthest last occurrence of every symbol encountered. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.partition-labels.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.partition-labels.recognize","title":"Last-Occurrence Partition: When to Use It","concept":"split sequences so each key belongs to one segment","summary":"Recognise the problem shape before choosing Last-Occurrence Partition.","rule":"No symbol may appear in two different output partitions. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.partition-labels.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.partition-labels.challenge","title":"Challenge: Last-Occurrence Partition","concept":"Return partition lengths.","summary":"Return partition lengths.","rule":"No symbol may appear in two different output partitions. Return partition lengths.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.partition-labels.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.deadline-scheduling.model","title":"Deadline Profit Scheduling: Mental Model","concept":"Take jobs in descending profit and place each in the latest free slot at or before its deadline.","summary":"Take jobs in descending profit and place each in the latest free slot at or before its deadline.","rule":"Take jobs in descending profit and place each in the latest free slot at or before its deadline. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.deadline-scheduling.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.deadline-scheduling.recognize","title":"Deadline Profit Scheduling: When to Use It","concept":"max reward under unit-time deadlines","summary":"Recognise the problem shape before choosing Deadline Profit Scheduling.","rule":"Earlier slots remain available for jobs with tighter deadlines. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.deadline-scheduling.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.deadline-scheduling.challenge","title":"Challenge: Deadline Profit Scheduling","concept":"Each job takes one time slot and earns its profit only if it runs in a slot no later than its 1-based deadline. Return the maximum total profit.","summary":"Each job takes one time slot and earns its profit only if it runs in a slot no later than its 1-based deadline. Return the maximum total profit.","rule":"Earlier slots remain available for jobs with tighter deadlines. Each job takes one time slot and earns its profit only if it runs in a slot no later than its 1-based deadline. Return the maximum total profit.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.deadline-scheduling.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.minimum-arrows.model","title":"Interval Stabbing: Mental Model","concept":"Sort by interval end and place a point only when the next interval starts after the current point.","summary":"Sort by interval end and place a point only when the next interval starts after the current point.","rule":"Sort by interval end and place a point only when the next interval starts after the current point. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.minimum-arrows.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.minimum-arrows.recognize","title":"Interval Stabbing: When to Use It","concept":"minimum sensors or arrows covering intervals","summary":"Recognise the problem shape before choosing Interval Stabbing.","rule":"It hits that interval while leaving maximum opportunity to hit overlapping intervals. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.minimum-arrows.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-greedy-intervals","id":"algorithm.minimum-arrows.challenge","title":"Challenge: Interval Stabbing","concept":"A point hits every closed interval containing it. Return the minimum points needed to hit all intervals.","summary":"A point hits every closed interval containing it. Return the minimum points needed to hit all intervals.","rule":"It hits that interval while leaving maximum opportunity to hit overlapping intervals. A point hits every closed interval containing it. Return the minimum points needed to hit all intervals.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.minimum-arrows.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.memoization.model","title":"Top-Down Memoization: Mental Model","concept":"Cache a recursive state the first time it is solved so overlapping subproblems run once.","summary":"Cache a recursive state the first time it is solved so overlapping subproblems run once.","rule":"Cache a recursive state the first time it is solved so overlapping subproblems run once. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.memoization.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.memoization.recognize","title":"Top-Down Memoization: When to Use It","concept":"recursive recurrences with repeated states","summary":"Recognise the problem shape before choosing Top-Down Memoization.","rule":"Repeated calls can reuse the same result. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.memoization.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.memoization.challenge","title":"Challenge: Top-Down Memoization","concept":"Parse n and return Fibonacci F(n), with F(0)=0 and F(1)=1. Teaching fixtures use n<=90 so all demonstrated u64 arithmetic fits.","summary":"Parse n and return Fibonacci F(n), with F(0)=0 and F(1)=1. Teaching fixtures use n<=90 so all demonstrated u64 arithmetic fits.","rule":"Repeated calls can reuse the same result. Parse n and return Fibonacci F(n), with F(0)=0 and F(1)=1. Teaching fixtures use n<=90 so all demonstrated u64 arithmetic fits.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.memoization.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.tabulation.model","title":"Bottom-Up Tabulation: Mental Model","concept":"Evaluate states in an order where every dependency is already available.","summary":"Evaluate states in an order where every dependency is already available.","rule":"Evaluate states in an order where every dependency is already available. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tabulation.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.tabulation.recognize","title":"Bottom-Up Tabulation: When to Use It","concept":"iterative recurrences and stack-free DP","summary":"Recognise the problem shape before choosing Bottom-Up Tabulation.","rule":"The number of ordered one-or-two-step routes to step i. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tabulation.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.tabulation.challenge","title":"Challenge: Bottom-Up Tabulation","concept":"Parse n and return the number of ordered ways to climb n steps using moves of one or two. There is one empty route when n=0.","summary":"Parse n and return the number of ordered ways to climb n steps using moves of one or two. There is one empty route when n=0.","rule":"The number of ordered one-or-two-step routes to step i. Parse n and return the number of ordered ways to climb n steps using moves of one or two. There is one empty route when n=0.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tabulation.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.rolling-dp.model","title":"Rolling-State DP: Mental Model","concept":"Discard table entries once no future transition can read them.","summary":"Discard table entries once no future transition can read them.","rule":"Discard table entries once no future transition can read them. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.rolling-dp.recognize","title":"Rolling-State DP: When to Use It","concept":"constant-space Fibonacci-like recurrences","summary":"Recognise the problem shape before choosing Rolling-State DP.","rule":"Each transition depends only on the previous two states. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.rolling-dp.challenge","title":"Challenge: Rolling-State DP","concept":"Parse cost=[...]. Start on stair 0 or stair 1. Landing on a stair pays its cost, and from there you move up one or two stairs. Return the minimum total cost to move beyond the final stair.","summary":"Parse cost=[...]. Start on stair 0 or stair 1. Landing on a stair pays its cost, and from there you move up one or two stairs. Return the minimum total cost to move beyond the final stair.","rule":"Each transition depends only on the previous two states. Parse cost=[...]. Start on stair 0 or stair 1. Landing on a stair pays its cost, and from there you move up one or two stairs. Return the minimum total cost to move beyond the final stair.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.rolling-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.house-robber.model","title":"Take-or-Skip DP: Mental Model","concept":"For each item compare skipping it with taking it plus the best compatible earlier state.","summary":"For each item compare skipping it with taking it plus the best compatible earlier state.","rule":"For each item compare skipping it with taking it plus the best compatible earlier state. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.house-robber.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.house-robber.recognize","title":"Take-or-Skip DP: When to Use It","concept":"non-adjacent selection and weighted independent paths","summary":"Recognise the problem shape before choosing Take-or-Skip DP.","rule":"Taking this item excludes its immediate predecessor. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.house-robber.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.house-robber.challenge","title":"Challenge: Take-or-Skip DP","concept":"Return the maximum non-adjacent sum.","summary":"Return the maximum non-adjacent sum.","rule":"Taking this item excludes its immediate predecessor. Return the maximum non-adjacent sum.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.house-robber.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.kadane.model","title":"Kadane Maximum Subarray: Mental Model","concept":"At each item choose whether to extend the current segment or start a new one.","summary":"At each item choose whether to extend the current segment or start a new one.","rule":"At each item choose whether to extend the current segment or start a new one. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kadane.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.kadane.recognize","title":"Kadane Maximum Subarray: When to Use It","concept":"best contiguous sum and one-dimensional local reset","summary":"Recognise the problem shape before choosing Kadane Maximum Subarray.","rule":"The required subarray is nonempty, including for all-negative inputs. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kadane.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.kadane.challenge","title":"Challenge: Kadane Maximum Subarray","concept":"Return the maximum contiguous sum.","summary":"Return the maximum contiguous sum.","rule":"The required subarray is nonempty, including for all-negative inputs. Return the maximum contiguous sum.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.kadane.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.coin-change-min.model","title":"Coin Change Minimum: Mental Model","concept":"Let each amount state choose one coin plus the best smaller reachable amount.","summary":"Let each amount state choose one coin plus the best smaller reachable amount.","rule":"Let each amount state choose one coin plus the best smaller reachable amount. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.coin-change-min.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.coin-change-min.recognize","title":"Coin Change Minimum: When to Use It","concept":"minimum unbounded composition and denomination planning","summary":"Recognise the problem shape before choosing Coin Change Minimum.","rule":"Zero would falsely claim those amounts need no coins. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.coin-change-min.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.coin-change-min.challenge","title":"Challenge: Coin Change Minimum","concept":"Return the fewest coins needed for amount 11, or -1 when that amount is unreachable.","summary":"Return the fewest coins needed for amount 11, or -1 when that amount is unreachable.","rule":"Zero would falsely claim those amounts need no coins. Return the fewest coins needed for amount 11, or -1 when that amount is unreachable.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.coin-change-min.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.word-break-dp.model","title":"Word Break DP: Mental Model","concept":"Mark a prefix reachable when an earlier reachable prefix is followed by a dictionary word.","summary":"Mark a prefix reachable when an earlier reachable prefix is followed by a dictionary word.","rule":"Mark a prefix reachable when an earlier reachable prefix is followed by a dictionary word. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.word-break-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.word-break-dp.recognize","title":"Word Break DP: When to Use It","concept":"string segmentation and tokenisation","summary":"Recognise the problem shape before choosing Word Break DP.","rule":"The complete prefix text[0..end] can be formed from dictionary words. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.word-break-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.word-break-dp.challenge","title":"Challenge: Word Break DP","concept":"Return whether the text can be segmented into dictionary words.","summary":"Return whether the text can be segmented into dictionary words.","rule":"The complete prefix text[0..end] can be formed from dictionary words. Return whether the text can be segmented into dictionary words.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.word-break-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.decode-ways.model","title":"Decode Ways DP: Mental Model","concept":"Count valid one-symbol and two-symbol predecessors while rejecting leading zero states.","summary":"Count valid one-symbol and two-symbol predecessors while rejecting leading zero states.","rule":"Count valid one-symbol and two-symbol predecessors while rejecting leading zero states. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.decode-ways.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.decode-ways.recognize","title":"Decode Ways DP: When to Use It","concept":"encoded strings with local validity rules","summary":"Recognise the problem shape before choosing Decode Ways DP.","rule":"Valid letter codes are 1 through 26. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.decode-ways.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.decode-ways.challenge","title":"Challenge: Decode Ways DP","concept":"Return the number of valid A=1 through Z=26 decodings.","summary":"Return the number of valid A=1 through Z=26 decodings.","rule":"Valid letter codes are 1 through 26. Return the number of valid A=1 through Z=26 decodings.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.decode-ways.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.lis-patience.model","title":"Longest Increasing Subsequence: Mental Model","concept":"Keep the smallest possible tail for an increasing subsequence of every length.","summary":"Keep the smallest possible tail for an increasing subsequence of every length.","rule":"Keep one candidate tail per subsequence length and binary-search where each new value belongs. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lis-patience.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.lis-patience.recognize","title":"Longest Increasing Subsequence: When to Use It","concept":"sequence order, envelopes, chain length","summary":"Recognise the problem shape before choosing Longest Increasing Subsequence.","rule":"It keeps the smallest possible tail for each strict subsequence length. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lis-patience.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.lis-patience.challenge","title":"Challenge: Longest Increasing Subsequence","concept":"Return the LIS length.","summary":"Return the LIS length.","rule":"It keeps the smallest possible tail for each strict subsequence length. Return the LIS length.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.lis-patience.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.zero-one-knapsack.model","title":"0/1 Knapsack: Mental Model","concept":"Update capacities backward so each item contributes at most once.","summary":"Update capacities backward so each item contributes at most once.","rule":"Update capacities backward so each item contributes at most once. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.zero-one-knapsack.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.zero-one-knapsack.recognize","title":"0/1 Knapsack: When to Use It","concept":"bounded selection under one capacity","summary":"Recognise the problem shape before choosing 0/1 Knapsack.","rule":"The item must not be reused through a state updated in the same pass. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.zero-one-knapsack.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-1d","id":"algorithm.zero-one-knapsack.challenge","title":"Challenge: 0/1 Knapsack","concept":"Return maximum value at capacity 7.","summary":"Return maximum value at capacity 7.","rule":"The item must not be reused through a state updated in the same pass. Return maximum value at capacity 7.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.zero-one-knapsack.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.grid-path-dp.model","title":"Grid Path DP: Mental Model","concept":"A cell combines ways or cost from the predecessor directions allowed by the movement rule.","summary":"A cell combines ways or cost from the predecessor directions allowed by the movement rule.","rule":"A cell combines ways or cost from the predecessor directions allowed by the movement rule. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.grid-path-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.grid-path-dp.recognize","title":"Grid Path DP: When to Use It","concept":"robot paths, matrix costs, obstacle grids","summary":"Recognise the problem shape before choosing Grid Path DP.","rule":"The old cell is the contribution from above and the new left cell is the contribution from the left. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.grid-path-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.grid-path-dp.challenge","title":"Challenge: Grid Path DP","concept":"Parse rows and cols. Count paths through that empty grid using right/down moves from the top-left cell to the bottom-right. A 1x1 grid has one path.","summary":"Parse rows and cols. Count paths through that empty grid using right/down moves from the top-left cell to the bottom-right. A 1x1 grid has one path.","rule":"The old cell is the contribution from above and the new left cell is the contribution from the left. Parse rows and cols. Count paths through that empty grid using right/down moves from the top-left cell to the bottom-right. A 1x1 grid has one path.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.grid-path-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.subset-sum.model","title":"Subset Sum DP: Mental Model","concept":"Track reachable totals and update backward so every item is used at most once.","summary":"Track reachable totals and update backward so every item is used at most once.","rule":"Track reachable totals and update backward so every item is used at most once. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.subset-sum.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.subset-sum.recognize","title":"Subset Sum DP: When to Use It","concept":"partition checks and bounded target reachability","summary":"Recognise the problem shape before choosing Subset Sum DP.","rule":"It prevents taking the current item multiple times. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.subset-sum.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.subset-sum.challenge","title":"Challenge: Subset Sum DP","concept":"Return whether some subset sums to 11.","summary":"Return whether some subset sums to 11.","rule":"It prevents taking the current item multiple times. Return whether some subset sums to 11.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.subset-sum.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.longest-common-subsequence.model","title":"Longest Common Subsequence: Mental Model","concept":"Match equal symbols diagonally; otherwise discard one suffix boundary and keep the better result.","summary":"Match equal symbols diagonally; otherwise discard one suffix boundary and keep the better result.","rule":"Match equal symbols diagonally; otherwise discard one suffix boundary and keep the better result. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.longest-common-subsequence.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.longest-common-subsequence.recognize","title":"Longest Common Subsequence: When to Use It","concept":"diffs, sequence similarity, deletion distance","summary":"Recognise the problem shape before choosing Longest Common Subsequence.","rule":"A common subsequence may skip characters without requiring adjacency. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.longest-common-subsequence.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.longest-common-subsequence.challenge","title":"Challenge: Longest Common Subsequence","concept":"Return the LCS length.","summary":"Return the LCS length.","rule":"A common subsequence may skip characters without requiring adjacency. Return the LCS length.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.longest-common-subsequence.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.edit-distance.model","title":"Edit Distance: Mental Model","concept":"Each state chooses insert, delete, or replace from adjacent smaller prefixes.","summary":"Each state chooses insert, delete, or replace from adjacent smaller prefixes.","rule":"Each state takes the cheapest single edit from adjacent smaller prefixes. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.edit-distance.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.edit-distance.recognize","title":"Edit Distance: When to Use It","concept":"spell correction, fuzzy matching, sequence alignment","summary":"Recognise the problem shape before choosing Edit Distance.","rule":"Insert, delete and substitute, each with unit cost. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.edit-distance.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.edit-distance.challenge","title":"Challenge: Edit Distance","concept":"Return Levenshtein distance.","summary":"Return Levenshtein distance.","rule":"Insert, delete and substitute, each with unit cost. Return Levenshtein distance.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.edit-distance.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.longest-pal-subsequence.model","title":"Longest Palindromic Subsequence: Mental Model","concept":"Equal interval ends add two; unequal ends discard one boundary and keep the better interval.","summary":"Equal interval ends add two; unequal ends discard one boundary and keep the better interval.","rule":"Equal interval ends add two; unequal ends discard one boundary and keep the better interval. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.longest-pal-subsequence.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.longest-pal-subsequence.recognize","title":"Longest Palindromic Subsequence: When to Use It","concept":"palindrome retention and minimum deletions","summary":"Recognise the problem shape before choosing Longest Palindromic Subsequence.","rule":"An optimal palindromic subsequence cannot require both unequal ends. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.longest-pal-subsequence.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.longest-pal-subsequence.challenge","title":"Challenge: Longest Palindromic Subsequence","concept":"Return the longest palindromic subsequence length.","summary":"Return the longest palindromic subsequence length.","rule":"An optimal palindromic subsequence cannot require both unequal ends. Return the longest palindromic subsequence length.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.longest-pal-subsequence.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.matrix-chain.model","title":"Matrix Chain DP: Mental Model","concept":"Try every final split of an interval and combine left cost, right cost, and multiplication cost.","summary":"Try every final split of an interval and combine left cost, right cost, and multiplication cost.","rule":"Try every final split of an interval and combine left cost, right cost, and multiplication cost. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-chain.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.matrix-chain.recognize","title":"Matrix Chain DP: When to Use It","concept":"optimal parenthesisation and associative operation planning","summary":"Recognise the problem shape before choosing Matrix Chain DP.","rule":"Different parenthesizations change intermediate multiplication dimensions. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-chain.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.matrix-chain.challenge","title":"Challenge: Matrix Chain DP","concept":"Return minimum scalar multiplications.","summary":"Return minimum scalar multiplications.","rule":"Different parenthesizations change intermediate multiplication dimensions. Return minimum scalar multiplications.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-chain.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.interval-dp.model","title":"Interval DP: Mental Model","concept":"Solve increasing interval lengths and choose the last or first action inside each interval.","summary":"Solve increasing interval lengths and choose the last or first action inside each interval.","rule":"Solve increasing interval lengths and choose the last or first action inside each interval. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.interval-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.interval-dp.recognize","title":"Interval DP: When to Use It","concept":"bursting, merging, polygon triangulation","summary":"Recognise the problem shape before choosing Interval DP.","rule":"Its two surviving boundary neighbors are then known. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.interval-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.interval-dp.challenge","title":"Challenge: Interval DP","concept":"Return maximum coins from bursting balloons.","summary":"Return maximum coins from bursting balloons.","rule":"Its two surviving boundary neighbors are then known. Return maximum coins from bursting balloons.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.interval-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.digit-dp.model","title":"Digit DP: Mental Model","concept":"Process digits with position, tight-bound, leading-zero, and property state.","summary":"Process digits with position, tight-bound, leading-zero, and property state.","rule":"Process digits with position, tight-bound, leading-zero, and property state. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.digit-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.digit-dp.recognize","title":"Digit DP: When to Use It","concept":"count numbers under a bound satisfying digit constraints","summary":"Recognise the problem shape before choosing Digit DP.","rule":"A tight prefix restricts the next digit to the bound's digit. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.digit-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.digit-dp.challenge","title":"Challenge: Digit DP","concept":"Parse bound and sum. Count integers from 0 through bound inclusive whose decimal digit sum is sum; zero has digit sum zero.","summary":"Parse bound and sum. Count integers from 0 through bound inclusive whose decimal digit sum is sum; zero has digit sum zero.","rule":"A tight prefix restricts the next digit to the bound's digit. Parse bound and sum. Count integers from 0 through bound inclusive whose decimal digit sum is sum; zero has digit sum zero.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.digit-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.bitmask-dp.model","title":"Bitmask DP: Mental Model","concept":"Encode the chosen subset in bits and transition by adding one unused item.","summary":"Encode the chosen subset in bits and transition by adding one unused item.","rule":"Encode the chosen subset in bits and transition by adding one unused item. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bitmask-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.bitmask-dp.recognize","title":"Bitmask DP: When to Use It","concept":"small assignment, travelling salesperson, pairing","summary":"Recognise the problem shape before choosing Bitmask DP.","rule":"The visited vertex subset and current final vertex. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bitmask-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.bitmask-dp.challenge","title":"Challenge: Bitmask DP","concept":"Return minimum tour cost starting and ending at 0.","summary":"Return minimum tour cost starting and ending at 0.","rule":"The visited vertex subset and current final vertex. Return minimum tour cost starting and ending at 0.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bitmask-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.tree-dp.model","title":"Tree DP: Mental Model","concept":"Return a compact choice summary from each subtree and combine children at their parent.","summary":"Return a compact choice summary from each subtree and combine children at their parent.","rule":"Return a compact choice summary from each subtree and combine children at their parent. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-dp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.tree-dp.recognize","title":"Tree DP: When to Use It","concept":"independent sets, subtree counts, reroot-ready summaries","summary":"Recognise the problem shape before choosing Tree DP.","rule":"Adjacent parent and child cannot both be selected. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.tree-dp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-dynamic-2d","id":"algorithm.tree-dp.challenge","title":"Challenge: Tree DP","concept":"Parse the compact level-order binary tree, written [...] with an optional tree= prefix, where null omits a node. Return the maximum sum of chosen nodes when no parent and child are both chosen.","summary":"Parse the compact level-order binary tree, written [...] with an optional tree= prefix, where null omits a node. Return the maximum sum of chosen nodes when no parent and child are both chosen.","rule":"Adjacent parent and child cannot both be selected. Parse the compact level-order binary tree, written [...] with an optional tree= prefix, where null omits a node. Return the maximum sum of chosen nodes when no parent and child are both chosen.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.tree-dp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.string-frequency.model","title":"Character Frequency: Mental Model","concept":"Count the text unit the problem defines: bytes, Unicode scalar values, or grapheme clusters.","summary":"Count the text unit the problem defines: bytes, Unicode scalar values, or grapheme clusters.","rule":"Count the text unit the problem defines: bytes, Unicode scalar values, or grapheme clusters. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.string-frequency.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.string-frequency.recognize","title":"Character Frequency: When to Use It","concept":"anagrams, inventory, first unique symbol","summary":"Recognise the problem shape before choosing Character Frequency.","rule":"The answer must be the first unique character in source order. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.string-frequency.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.string-frequency.challenge","title":"Challenge: Character Frequency","concept":"Return the first non-repeated ASCII character in source order, or none when no such character exists.","summary":"Return the first non-repeated ASCII character in source order, or none when no such character exists.","rule":"The answer must be the first unique character in source order. Return the first non-repeated ASCII character in source order, or none when no such character exists.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.string-frequency.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.string-two-pointers.model","title":"String Two Pointers: Mental Model","concept":"Move across symbol boundaries deliberately rather than indexing arbitrary UTF-8 bytes.","summary":"Move across symbol boundaries deliberately rather than indexing arbitrary UTF-8 bytes.","rule":"Move across symbol boundaries deliberately rather than indexing arbitrary UTF-8 bytes. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.string-two-pointers.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.string-two-pointers.recognize","title":"String Two Pointers: When to Use It","concept":"palindromes, trimming, mirrored comparison","summary":"Recognise the problem shape before choosing String Two Pointers.","rule":"It filters and compares symbols lazily from both ends. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.string-two-pointers.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.string-two-pointers.challenge","title":"Challenge: String Two Pointers","concept":"Ignore non-alphanumeric ASCII and case; return whether the text is a palindrome.","summary":"Ignore non-alphanumeric ASCII and case; return whether the text is a palindrome.","rule":"It filters and compares symbols lazily from both ends. Ignore non-alphanumeric ASCII and case; return whether the text is a palindrome.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.string-two-pointers.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.run-length-encoding.model","title":"Run-Length Encoding: Mental Model","concept":"Group maximal adjacent equal symbols and emit the symbol with its run length.","summary":"Group maximal adjacent equal symbols and emit the symbol with its run length.","rule":"Group maximal adjacent equal symbols and emit the symbol with its run length. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.run-length-encoding.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.run-length-encoding.recognize","title":"Run-Length Encoding: When to Use It","concept":"compression, repeated-span summaries, token runs","summary":"Recognise the problem shape before choosing Run-Length Encoding.","rule":"The next character differs or the input ends. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.run-length-encoding.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.run-length-encoding.challenge","title":"Challenge: Run-Length Encoding","concept":"Encode consecutive characters as character followed by count.","summary":"Encode consecutive characters as character followed by count.","rule":"The next character differs or the input ends. Encode consecutive characters as character followed by count.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.run-length-encoding.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.kmp.model","title":"Knuth–Morris–Pratt: Mental Model","concept":"Use the pattern's border table to reuse matched-prefix knowledge after a mismatch.","summary":"Use the pattern's border table to reuse matched-prefix knowledge after a mismatch.","rule":"Use the pattern's border table to reuse matched-prefix knowledge after a mismatch. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kmp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.kmp.recognize","title":"Knuth–Morris–Pratt: When to Use It","concept":"linear exact substring search and border queries","summary":"Recognise the problem shape before choosing Knuth–Morris–Pratt.","rule":"A known proper prefix may already match the suffix just read. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.kmp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.kmp.challenge","title":"Challenge: Knuth–Morris–Pratt","concept":"Return the first pattern index in the text, or -1 if absent.","summary":"Return the first pattern index in the text, or -1 if absent.","rule":"A known proper prefix may already match the suffix just read. Return the first pattern index in the text, or -1 if absent.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.kmp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.z-algorithm.model","title":"Z Algorithm: Mental Model","concept":"Reuse the rightmost prefix-matching box to compute how much of the prefix matches at every position.","summary":"Reuse the rightmost prefix-matching box to compute how much of the prefix matches at every position.","rule":"Reuse the rightmost prefix-matching box to compute how much of the prefix matches at every position. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.z-algorithm.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.z-algorithm.recognize","title":"Z Algorithm: When to Use It","concept":"pattern search, repetitions, prefix matches","summary":"Recognise the problem shape before choosing Z Algorithm.","rule":"The prefix length matching the substring beginning at i. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.z-algorithm.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.z-algorithm.challenge","title":"Challenge: Z Algorithm","concept":"Return the Z array.","summary":"Return the Z array.","rule":"The prefix length matching the substring beginning at i. Return the Z array.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.z-algorithm.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.rabin-karp.model","title":"Rabin–Karp: Mental Model","concept":"Compare rolling hashes first and verify actual bytes only on hash matches.","summary":"Compare rolling hashes first and verify actual bytes only on hash matches.","rule":"Compare rolling hashes first and verify actual bytes only on hash matches. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rabin-karp.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.rabin-karp.recognize","title":"Rabin–Karp: When to Use It","concept":"multiple pattern candidates and substring fingerprints","summary":"Recognise the problem shape before choosing Rabin–Karp.","rule":"Hash collisions can make different substrings share a fingerprint. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.rabin-karp.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.rabin-karp.challenge","title":"Challenge: Rabin–Karp","concept":"Return every start index of the pattern, ascending, or an empty string if absent. Confirm the bytes after a hash match.","summary":"Return every start index of the pattern, ascending, or an empty string if absent. Confirm the bytes after a hash match.","rule":"Hash collisions can make different substrings share a fingerprint. Return every start index of the pattern, ascending, or an empty string if absent. Confirm the bytes after a hash match.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.rabin-karp.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.trie.model","title":"Prefix Trie: Mental Model","concept":"Store one edge per next symbol so shared prefixes occupy shared nodes.","summary":"Store one edge per next symbol so shared prefixes occupy shared nodes.","rule":"Store one edge per next symbol so shared prefixes occupy shared nodes. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.trie.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.trie.recognize","title":"Prefix Trie: When to Use It","concept":"prefix lookup, autocomplete, dictionary traversal","summary":"Recognise the problem shape before choosing Prefix Trie.","rule":"It counts inserted words whose path includes that prefix. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.trie.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.trie.challenge","title":"Challenge: Prefix Trie","concept":"Parse words and prefix. Return how many listed words begin with that prefix, counting repeated listed words separately.","summary":"Parse words and prefix. Return how many listed words begin with that prefix, counting repeated listed words separately.","rule":"It counts inserted words whose path includes that prefix. Parse words and prefix. Return how many listed words begin with that prefix, counting repeated listed words separately.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.trie.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.aho-corasick.model","title":"Aho–Corasick: Mental Model","concept":"Add failure links to a trie so one scan reports all pattern suffixes ending at each position.","summary":"Add failure links to a trie so one scan reports all pattern suffixes ending at each position.","rule":"Add failure links to a trie so one scan reports all pattern suffixes ending at each position. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.aho-corasick.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.aho-corasick.recognize","title":"Aho–Corasick: When to Use It","concept":"many-pattern search, filters, signature scanning","summary":"Recognise the problem shape before choosing Aho–Corasick.","rule":"A suffix of the current match may itself be a pattern. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.aho-corasick.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.aho-corasick.challenge","title":"Challenge: Aho–Corasick","concept":"Parse lowercase ASCII text and nonempty lowercase ASCII patterns. Count every pattern occurrence, including overlaps and simultaneous suffix matches.","summary":"Parse lowercase ASCII text and nonempty lowercase ASCII patterns. Count every pattern occurrence, including overlaps and simultaneous suffix matches.","rule":"A suffix of the current match may itself be a pattern. Parse lowercase ASCII text and nonempty lowercase ASCII patterns. Count every pattern occurrence, including overlaps and simultaneous suffix matches.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.aho-corasick.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.suffix-array.model","title":"Suffix Array: Mental Model","concept":"Sort suffix ranks by doubling compared prefix length until every suffix has a unique rank.","summary":"Sort suffix ranks by doubling compared prefix length until every suffix has a unique rank.","rule":"Sort suffix ranks by doubling compared prefix length until every suffix has a unique rank. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-array.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.suffix-array.recognize","title":"Suffix Array: When to Use It","concept":"substring order, repeated substrings, offline text indexes","summary":"Recognise the problem shape before choosing Suffix Array.","rule":"Two width-k ranks identify a width-2k comparison key. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-array.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.suffix-array.challenge","title":"Challenge: Suffix Array","concept":"Return suffix starting indexes in lexicographic order.","summary":"Return suffix starting indexes in lexicographic order.","rule":"Two width-k ranks identify a width-2k comparison key. Return suffix starting indexes in lexicographic order.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-array.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.manacher.model","title":"Manacher Palindrome Radii: Mental Model","concept":"Mirror known radii inside the rightmost palindrome and expand only beyond its boundary.","summary":"Mirror known radii inside the rightmost palindrome and expand only beyond its boundary.","rule":"Mirror known radii inside the rightmost palindrome and expand only beyond its boundary. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.manacher.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.manacher.recognize","title":"Manacher Palindrome Radii: When to Use It","concept":"all palindromic centers and longest palindrome in linear time","summary":"Recognise the problem shape before choosing Manacher Palindrome Radii.","rule":"Symmetry guarantees that portion, while beyond it new comparisons are required. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.manacher.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-strings-tries","id":"algorithm.manacher.challenge","title":"Challenge: Manacher Palindrome Radii","concept":"Return the longest palindromic substring; choose the earliest on ties.","summary":"Return the longest palindromic substring; choose the earliest on ties.","rule":"Symmetry guarantees that portion, while beyond it new comparisons are required. Return the longest palindromic substring; choose the earliest on ties.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.manacher.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.euclid-gcd.model","title":"Euclidean GCD: Mental Model","concept":"Replace the larger pair with divisor and remainder without changing their greatest common divisor.","summary":"Replace the larger pair with divisor and remainder without changing their greatest common divisor.","rule":"Replace the larger pair with divisor and remainder without changing their greatest common divisor. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.euclid-gcd.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.euclid-gcd.recognize","title":"Euclidean GCD: When to Use It","concept":"fraction reduction, periods, lattice steps","summary":"Recognise the problem shape before choosing Euclidean GCD.","rule":"The common divisors of the pair are unchanged. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.euclid-gcd.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.euclid-gcd.challenge","title":"Challenge: Euclidean GCD","concept":"Parse nonnegative a and b and return their greatest common divisor; gcd(a,0)=a and gcd(0,0)=0.","summary":"Parse nonnegative a and b and return their greatest common divisor; gcd(a,0)=a and gcd(0,0)=0.","rule":"The common divisors of the pair are unchanged. Parse nonnegative a and b and return their greatest common divisor; gcd(a,0)=a and gcd(0,0)=0.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.euclid-gcd.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.bitmask-enumeration.model","title":"Bitmask Enumeration: Mental Model","concept":"Use each bit as an include/exclude choice for one item.","summary":"Use each bit as an include/exclude choice for one item.","rule":"Use each bit as an include/exclude choice for one item. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bitmask-enumeration.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.bitmask-enumeration.recognize","title":"Bitmask Enumeration: When to Use It","concept":"small subsets, permissions, feature combinations","summary":"Recognise the problem shape before choosing Bitmask Enumeration.","rule":"It selects input position i, including when values repeat. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.bitmask-enumeration.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.bitmask-enumeration.challenge","title":"Challenge: Bitmask Enumeration","concept":"Parse values and return, in increasing order, every zero-based position mask whose selected values sum to 5.","summary":"Parse values and return, in increasing order, every zero-based position mask whose selected values sum to 5.","rule":"It selects input position i, including when values repeat. Parse values and return, in increasing order, every zero-based position mask whose selected values sum to 5.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.bitmask-enumeration.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.xor-cancellation.model","title":"XOR Cancellation: Mental Model","concept":"Equal values cancel and zero is neutral, leaving an odd-occurring value.","summary":"Equal values cancel and zero is neutral, leaving an odd-occurring value.","rule":"Equal values cancel and zero is neutral, leaving an odd-occurring value. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.xor-cancellation.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.xor-cancellation.recognize","title":"XOR Cancellation: When to Use It","concept":"single-number recovery and parity fingerprints","summary":"Recognise the problem shape before choosing XOR Cancellation.","rule":"Every other value occurs exactly twice. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.xor-cancellation.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.xor-cancellation.challenge","title":"Challenge: XOR Cancellation","concept":"Every value occurs twice except one; return it.","summary":"Every value occurs twice except one; return it.","rule":"Every other value occurs exactly twice. Every value occurs twice except one; return it.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.xor-cancellation.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.sieve.model","title":"Sieve of Eratosthenes: Mental Model","concept":"Mark multiples beginning at p squared for each still-prime p.","summary":"Mark multiples beginning at p squared for each still-prime p.","rule":"Mark multiples beginning at p squared for each still-prime p. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sieve.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.sieve.recognize","title":"Sieve of Eratosthenes: When to Use It","concept":"prime tables and factor-precomputation","summary":"Recognise the problem shape before choosing Sieve of Eratosthenes.","rule":"Smaller multiples already have a smaller prime factor. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sieve.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.sieve.challenge","title":"Challenge: Sieve of Eratosthenes","concept":"Parse n and return primes not exceeding n in ascending order, as comma-separated integers.","summary":"Parse n and return primes not exceeding n in ascending order, as comma-separated integers.","rule":"Smaller multiples already have a smaller prime factor. Parse n and return primes not exceeding n in ascending order, as comma-separated integers.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.sieve.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.fast-power.model","title":"Binary Exponentiation: Mental Model","concept":"Square the base and consume exponent bits so only logarithmically many multiplications occur.","summary":"Square the base and consume exponent bits so only logarithmically many multiplications occur.","rule":"Square the base and consume exponent bits so only logarithmically many multiplications occur. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.fast-power.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.fast-power.recognize","title":"Binary Exponentiation: When to Use It","concept":"large powers, modular arithmetic, repeated transforms","summary":"Recognise the problem shape before choosing Binary Exponentiation.","rule":"It processes one binary exponent bit per iteration. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.fast-power.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.fast-power.challenge","title":"Challenge: Binary Exponentiation","concept":"Parse base, exp and a positive mod; return base^exp modulo mod, including exp=0, so mod=1 gives 0.","summary":"Parse base, exp and a positive mod; return base^exp modulo mod, including exp=0, so mod=1 gives 0.","rule":"It processes one binary exponent bit per iteration. Parse base, exp and a positive mod; return base^exp modulo mod, including exp=0, so mod=1 gives 0.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.fast-power.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.modular-inverse.model","title":"Modular Inverse: Mental Model","concept":"Use extended Euclid when gcd is one, or Fermat under a known prime modulus.","summary":"Use extended Euclid when gcd is one, or Fermat under a known prime modulus.","rule":"Use extended Euclid when gcd is one, or Fermat under a known prime modulus. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.modular-inverse.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.modular-inverse.recognize","title":"Modular Inverse: When to Use It","concept":"division in modular arithmetic and combinatorics","summary":"Recognise the problem shape before choosing Modular Inverse.","rule":"Exactly when gcd(a,m)=1. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.modular-inverse.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.modular-inverse.challenge","title":"Challenge: Modular Inverse","concept":"Parse a and mod with mod>1 and gcd(a,mod)=1. Return the inverse normalized to 0..mod-1.","summary":"Parse a and mod with mod>1 and gcd(a,mod)=1. Return the inverse normalized to 0..mod-1.","rule":"Exactly when gcd(a,m)=1. Parse a and mod with mod>1 and gcd(a,mod)=1. Return the inverse normalized to 0..mod-1.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.modular-inverse.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.binomial-coefficients.model","title":"Binomial Coefficients: Mental Model","concept":"Build Pascal recurrence or multiply a shortened numerator while controlling division.","summary":"Build Pascal recurrence or multiply a shortened numerator while controlling division.","rule":"Build Pascal recurrence or multiply a shortened numerator while controlling division. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binomial-coefficients.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.binomial-coefficients.recognize","title":"Binomial Coefficients: When to Use It","concept":"choose-k counts, lattice paths, probability","summary":"Recognise the problem shape before choosing Binomial Coefficients.","rule":"Choosing k elements is symmetric with choosing the omitted n-k. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.binomial-coefficients.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.binomial-coefficients.challenge","title":"Challenge: Binomial Coefficients","concept":"Parse n and k and return n choose k. The multiplicative example bounds n<=60; return 0 when k>n.","summary":"Parse n and k and return n choose k. The multiplicative example bounds n<=60; return 0 when k>n.","rule":"Choosing k elements is symmetric with choosing the omitted n-k. Parse n and k and return n choose k. The multiplicative example bounds n<=60; return 0 when k>n.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.binomial-coefficients.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.gray-code.model","title":"Gray Code: Mental Model","concept":"Map i to i xor (i shifted right) so neighboring codes differ by one bit.","summary":"Map i to i xor (i shifted right) so neighboring codes differ by one bit.","rule":"Map each index i to i xor (i shifted right by one) to produce binary-reflected Gray code order. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.gray-code.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.gray-code.recognize","title":"Gray Code: When to Use It","concept":"single-bit state transitions and test sequences","summary":"Recognise the problem shape before choosing Gray Code.","rule":"Consecutive generated codes differ in exactly one bit. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.gray-code.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.gray-code.challenge","title":"Challenge: Gray Code","concept":"Parse n and return n-bit binary-reflected Gray code order. For n=0 return the single code 0.","summary":"Parse n and return n-bit binary-reflected Gray code order. For n=0 return the single code 0.","rule":"Consecutive generated codes differ in exactly one bit. Parse n and return n-bit binary-reflected Gray code order. For n=0 return the single code 0.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.gray-code.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.matrix-exponentiation.model","title":"Matrix Exponentiation: Mental Model","concept":"Encode a linear recurrence as a matrix and exponentiate the transition by squaring.","summary":"Encode a linear recurrence as a matrix and exponentiate the transition by squaring.","rule":"Encode a linear recurrence as a matrix and exponentiate the transition by squaring. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-exponentiation.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.matrix-exponentiation.recognize","title":"Matrix Exponentiation: When to Use It","concept":"huge recurrence indexes and state transitions","summary":"Recognise the problem shape before choosing Matrix Exponentiation.","rule":"Exponentiation processes the exponent's binary representation. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-exponentiation.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.matrix-exponentiation.challenge","title":"Challenge: Matrix Exponentiation","concept":"Parse n and return Fibonacci F(n), with F(0)=0 and F(1)=1; n<=90 in this u64 example.","summary":"Parse n and return Fibonacci F(n), with F(0)=0 and F(1)=1; n<=90 in this u64 example.","rule":"Exponentiation processes the exponent's binary representation. Parse n and return Fibonacci F(n), with F(0)=0 and F(1)=1; n<=90 in this u64 example.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.matrix-exponentiation.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.miller-rabin.model","title":"Miller–Rabin Primality: Mental Model","concept":"Write n-1 as d times a power of two and test whether modular powers witness compositeness.","summary":"Write n-1 as d times a power of two and test whether modular powers witness compositeness.","rule":"Write n-1 as d times a power of two and test whether modular powers witness compositeness. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.miller-rabin.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.miller-rabin.recognize","title":"Miller–Rabin Primality: When to Use It","concept":"fast primality for large machine integers","summary":"Recognise the problem shape before choosing Miller–Rabin Primality.","rule":"The tested number is composite. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.miller-rabin.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-math-bits","id":"algorithm.miller-rabin.challenge","title":"Challenge: Miller–Rabin Primality","concept":"Parse unsigned n and return whether it is prime. The Rust example uses deterministic unsigned-64-bit witnesses; zero and one are not prime.","summary":"Parse unsigned n and return whether it is prime. The Rust example uses deterministic unsigned-64-bit witnesses; zero and one are not prime.","rule":"The tested number is composite. Parse unsigned n and return whether it is prime. The Rust example uses deterministic unsigned-64-bit witnesses; zero and one are not prime.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.miller-rabin.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.sparse-table.model","title":"Sparse Table: Mental Model","concept":"Precompute answers for power-of-two blocks and combine two blocks for idempotent queries.","summary":"Precompute answers for power-of-two blocks and combine two blocks for idempotent queries.","rule":"Precompute answers for power-of-two blocks and combine two blocks for idempotent queries. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sparse-table.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.sparse-table.recognize","title":"Sparse Table: When to Use It","concept":"immutable range minimum, maximum, gcd","summary":"Recognise the problem shape before choosing Sparse Table.","rule":"Minimum is idempotent, so overlap does not double-count a contribution. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.sparse-table.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.sparse-table.challenge","title":"Challenge: Sparse Table","concept":"Return minima for inclusive ranges [0,3], [2,5], [4,6], in that order; input contains at least seven integers.","summary":"Return minima for inclusive ranges [0,3], [2,5], [4,6], in that order; input contains at least seven integers.","rule":"Minimum is idempotent, so overlap does not double-count a contribution. Return minima for inclusive ranges [0,3], [2,5], [4,6], in that order; input contains at least seven integers.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.sparse-table.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.disjoint-set-union.model","title":"Disjoint Set Union: Mental Model","concept":"Compress find paths and attach smaller trees beneath larger roots.","summary":"Compress find paths and attach smaller trees beneath larger roots.","rule":"Compress find paths and attach smaller trees beneath larger roots. State the input preconditions before applying it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.disjoint-set-union.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.disjoint-set-union.recognize","title":"Disjoint Set Union: When to Use It","concept":"dynamic connectivity, Kruskal, grouping","summary":"Recognise the problem shape before choosing Disjoint Set Union.","rule":"It bounds tree depth before path compression further shortens finds. State the input preconditions before applying this invariant.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.disjoint-set-union.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.disjoint-set-union.challenge","title":"Challenge: Disjoint Set Union","concept":"Apply the listed unions and return the final component count.","summary":"Apply the listed unions and return the final component count.","rule":"It bounds tree depth before path compression further shortens finds. Apply the listed unions and return the final component count.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.disjoint-set-union.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.lazy-segment-tree.model","title":"Lazy Segment Tree: Mental Model","concept":"Store pending range operations at covering nodes and push them only before descending.","summary":"Store pending range operations at covering nodes and push them only before descending.","rule":"Store pending range operations at covering nodes and push them only before descending. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lazy-segment-tree.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.lazy-segment-tree.recognize","title":"Lazy Segment Tree: When to Use It","concept":"range updates plus range aggregate queries","summary":"Recognise the problem shape before choosing Lazy Segment Tree.","rule":"An addition already included in this node's sum but not yet pushed to children. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.lazy-segment-tree.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.lazy-segment-tree.challenge","title":"Challenge: Lazy Segment Tree","concept":"Add 3 to inclusive indexes 1..4, then return the sum of inclusive indexes 2..5. Input contains at least six integers.","summary":"Add 3 to inclusive indexes 1..4, then return the sum of inclusive indexes 2..5. Input contains at least six integers.","rule":"An addition already included in this node's sum but not yet pushed to children. Add 3 to inclusive indexes 1..4, then return the sum of inclusive indexes 2..5. Input contains at least six integers.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.lazy-segment-tree.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.treap.model","title":"Randomized Treap: Mental Model","concept":"Keep BST order by key and heap order by random priority; insertion rotates a new node up and deletion merges its children.","summary":"Keep BST order by key and heap order by random priority; insertion rotates a new node up and deletion merges its children.","rule":"Give every key a random priority, rotate a new node up on insertion, and merge a deleted node's children. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.treap.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.treap.recognize","title":"Randomized Treap: When to Use It","concept":"ordered sets with expected logarithmic operations","summary":"Recognise the problem shape before choosing Randomized Treap.","rule":"BST order by key and heap order by priority. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.treap.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.treap.challenge","title":"Challenge: Randomized Treap","concept":"Apply the space-separated insertN and deleteN tokens, then return the keys ascending at inorder. Keys form a set: inserting a present key and deleting an absent key change nothing.","summary":"Apply the space-separated insertN and deleteN tokens, then return the keys ascending at inorder. Keys form a set: inserting a present key and deleting an absent key change nothing.","rule":"BST order by key and heap order by priority. Apply the space-separated insertN and deleteN tokens, then return the keys ascending at inorder. Keys form a set: inserting a present key and deleting an absent key change nothing.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.treap.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.skip-list.model","title":"Skip List: Mental Model","concept":"Promote nodes randomly into sparse express lanes and descend when the next jump overshoots.","summary":"Promote nodes randomly into sparse express lanes and descend when the next jump overshoots.","rule":"Promote nodes randomly into sparse express lanes and descend when the next jump overshoots. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.skip-list.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.skip-list.recognize","title":"Skip List: When to Use It","concept":"probabilistic ordered maps and concurrent-friendly indexes","summary":"Recognise the problem shape before choosing Skip List.","rule":"Lower levels refine the search within the remaining key interval. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.skip-list.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.skip-list.challenge","title":"Challenge: Skip List","concept":"Return whether 19 is found after inserting the values.","summary":"Return whether 19 is found after inserting the values.","rule":"Lower levels refine the search within the remaining key interval. Return whether 19 is found after inserting the values.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.skip-list.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.dsu-rollback.model","title":"Rollback DSU: Mental Model","concept":"Record every parent or size mutation so recursion over time can undo unions without path compression.","summary":"Record every parent or size mutation so recursion over time can undo unions without path compression.","rule":"Record every parent or size mutation so recursion over time can undo unions without path compression. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dsu-rollback.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.dsu-rollback.recognize","title":"Rollback DSU: When to Use It","concept":"offline dynamic connectivity and divide-over-time","summary":"Recognise the problem shape before choosing Rollback DSU.","rule":"Every parent change would need to be recorded to undo it. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.dsu-rollback.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.dsu-rollback.challenge","title":"Challenge: Rollback DSU","concept":"Apply unions and checkpoint operations, then answer the connectivity query after rollback.","summary":"Apply unions and checkpoint operations, then answer the connectivity query after rollback.","rule":"Every parent change would need to be recorded to undo it. Apply unions and checkpoint operations, then answer the connectivity query after rollback.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.dsu-rollback.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.mo-algorithm.model","title":"Mo's Algorithm: Mental Model","concept":"Order offline range queries so adjacent queries move their boundaries only a small distance.","summary":"Order offline range queries so adjacent queries move their boundaries only a small distance.","rule":"Order offline range queries so adjacent queries move their boundaries only a small distance. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.mo-algorithm.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.mo-algorithm.recognize","title":"Mo's Algorithm: When to Use It","concept":"many immutable range queries with cheap add/remove","summary":"Recognise the problem shape before choosing Mo's Algorithm.","rule":"Nearby query endpoints share most maintained window state. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.mo-algorithm.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.mo-algorithm.challenge","title":"Challenge: Mo's Algorithm","concept":"Return distinct-value counts for inclusive ranges [0,3], [2,5], [0,5], in that order; input contains at least six integers.","summary":"Return distinct-value counts for inclusive ranges [0,3], [2,5], [0,5], in that order; input contains at least six integers.","rule":"Nearby query endpoints share most maintained window state. Return distinct-value counts for inclusive ranges [0,3], [2,5], [0,5], in that order; input contains at least six integers.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.mo-algorithm.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.heavy-light.model","title":"Heavy-Light Decomposition: Mental Model","concept":"Choose one heavy child per node so any root path crosses only logarithmically many light edges.","summary":"Choose one heavy child per node so any root path crosses only logarithmically many light edges.","rule":"Choose one heavy child per node so any root path crosses only logarithmically many light edges. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.heavy-light.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.heavy-light.recognize","title":"Heavy-Light Decomposition: When to Use It","concept":"tree path queries with segment trees","summary":"Recognise the problem shape before choosing Heavy-Light Decomposition.","rule":"Crossing a light edge reduces remaining subtree size by a constant factor. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.heavy-light.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.heavy-light.challenge","title":"Challenge: Heavy-Light Decomposition","concept":"Return the sum on path 2 to 4.","summary":"Return the sum on path 2 to 4.","rule":"Crossing a light edge reduces remaining subtree size by a constant factor. Return the sum on path 2 to 4.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.heavy-light.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.centroid-decomposition.model","title":"Centroid Decomposition: Mental Model","concept":"Remove a balancing centroid and recurse on components no larger than half the original.","summary":"Remove a balancing centroid and recurse on components no larger than half the original.","rule":"Remove a balancing centroid and recurse on each remaining component, which keeps the depth logarithmic. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.centroid-decomposition.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.centroid-decomposition.recognize","title":"Centroid Decomposition: When to Use It","concept":"dynamic distance queries and divide-and-conquer on trees","summary":"Recognise the problem shape before choosing Centroid Decomposition.","rule":"Removing it leaves no component larger than half the current component. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.centroid-decomposition.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.centroid-decomposition.challenge","title":"Challenge: Centroid Decomposition","concept":"Parse n and edges of a nonempty connected tree. Return its first centroid, choosing the smaller vertex index when two qualify.","summary":"Parse n and edges of a nonempty connected tree. Return its first centroid, choosing the smaller vertex index when two qualify.","rule":"Removing it leaves no component larger than half the current component. Parse n and edges of a nonempty connected tree. Return its first centroid, choosing the smaller vertex index when two qualify.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.centroid-decomposition.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.suffix-automaton.model","title":"Suffix Automaton: Mental Model","concept":"Extend one character while cloning states when needed to preserve end-position equivalence classes.","summary":"Extend one character while cloning states when needed to preserve end-position equivalence classes.","rule":"Extend one character while cloning states when needed to preserve end-position equivalence classes. State the input preconditions before applying it.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-automaton.model","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.suffix-automaton.recognize","title":"Suffix Automaton: When to Use It","concept":"all substrings, repeated substring counts, online text indexing","summary":"Recognise the problem shape before choosing Suffix Automaton.","rule":"It represents one new substring for each length in that interval. State the input preconditions before applying this invariant.","minutes":15,"exerciseKind":"planned","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-automaton.recognize","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"algorithms","unitId":"algorithms-advanced-structures","id":"algorithm.suffix-automaton.challenge","title":"Challenge: Suffix Automaton","concept":"Return the number of distinct non-empty substrings.","summary":"Return the number of distinct non-empty substrings.","rule":"It represents one new substring for each length in that interval. Return the number of distinct non-empty substrings.","minutes":15,"exerciseKind":"algorithmChallenge","url":"https://crabrix.com/learn/algorithms/algorithm.suffix-automaton.challenge","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership","id":"ownership","title":"Ownership","concept":"Moves and scope","summary":"Ownership gives every value one clear cleanup responsibility.","rule":"One value, one owner; a move ends the previous binding.","minutes":13,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/ownership/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership","id":"borrowing","title":"Borrowing","concept":"References and E0502","summary":"Borrowing lets code use a value without taking ownership.","rule":"Many shared borrows or one mutable borrow, never both at once.","minutes":14,"exerciseKind":"borrowDiagnostic","url":"https://crabrix.com/learn/ownership/borrowing/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership","id":"slices","title":"Slices","concept":"Borrowed views into data","summary":"Slices are borrowed views into contiguous data.","rule":"A slice borrows a range; it allocates nothing.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/slices/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership","id":"copy-clone","title":"Copy & Clone","concept":"When a value duplicates instead of moving","summary":"Copy duplicates implicitly; Clone duplicates only when you ask.","rule":"`Copy` permits implicit bitwise duplication; `Clone` is explicit and has a type-specific cost.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/copy-clone/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership","id":"drop-order","title":"Drop & Scope","concept":"Deterministic cleanup without a GC","summary":"Cleanup runs at a place you can point to in the source.","rule":"At scope end, remaining locals drop in reverse declaration order; struct fields drop in declaration order.","minutes":13,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/drop-order/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership","id":"lifetimes-intro","title":"Lifetime Intuition","concept":"Why references stay valid","summary":"Lifetimes describe relationships between references, not timers.","rule":"A lifetime annotation relates borrows; it never extends one.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/lifetimes-intro/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"generics","title":"Generics","concept":"Reusable types and functions","summary":"Generics reuse an algorithm while keeping concrete types.","rule":"Concrete generic instantiations normally use static dispatch; measure code size, allocation and runtime cost.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/generics/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"traits","title":"Traits","concept":"Shared behavior and bounds","summary":"Traits define shared behaviour independently of a concrete type.","rule":"Use generics for static dispatch and trait objects for dynamic dispatch; neither choice alone determines performance.","minutes":18,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/traits/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"lifetimes","title":"Lifetimes","concept":"Relationships between borrows","summary":"Lifetime annotations connect the borrows in a signature.","rule":"A struct holding a reference is bounded by that reference's lifetime.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/lifetimes/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"closures","title":"Closures","concept":"Fn, FnMut, FnOnce, and capture","summary":"A closure is a function that also carries the environment it captured.","rule":"Call traits depend on how the body uses captures: `Fn` borrows, `FnMut` may mutate, and moving a capture out can require `FnOnce`.","minutes":18,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/closures/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"iterators","title":"Iterators","concept":"Lazy transformations","summary":"Iterators compose lazy transformations before consuming results.","rule":"Adapters are lazy; a consumer is what makes the work happen.","minutes":18,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/iterators/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"iterator-impl","title":"Writing an Iterator","concept":"impl Iterator and the next method","summary":"Implementing one method gives you the whole adapter library.","rule":"Implement next(); the adapters are default methods on the trait.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/iterator-impl/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"associated-types","title":"Associated Types","concept":"One output type per implementation","summary":"An associated type fixes one output type per implementation.","rule":"An associated type is fixed per trait implementation; trait parameters can distinguish implementations for the same type.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/associated-types/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction","id":"operator-traits","title":"Operator Traits","concept":"Add, Display, From, and Into","summary":"Operators and conversions are ordinary traits you can implement.","rule":"Implement From, and Into is generated for you — never implement both.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/operator-traits/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"move-functions","title":"Moves Across Functions","concept":"Parameters can take, borrow, or copy a value","summary":"Parameters can take, borrow, or copy a value.","rule":"A parameter of type `String` takes ownership, while `&str` only borrows text.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/move-functions/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"mutable-borrows","title":"Mutable Borrows","concept":"One temporary writer with exclusive access","summary":"One temporary writer with exclusive access.","rule":"An `&mut` reference permits mutation without transferring ownership.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/mutable-borrows/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"reborrowing","title":"Reborrowing","concept":"Lend access without consuming the original reference","summary":"Lend access without consuming the original reference.","rule":"Passing `&mut *value` creates a shorter reborrow instead of moving the original mutable reference.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/reborrowing/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"partial-moves","title":"Partial Moves","concept":"Move one field while borrowing another","summary":"Move one field while borrowing another.","rule":"Destructuring can move an owned field and copy or borrow the rest.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/partial-moves/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"interior-mutability-intro","title":"Interior Mutability","concept":"Move a checked borrow rule to runtime","summary":"Move a checked borrow rule to runtime.","rule":"`Cell` and `RefCell` allow mutation behind an immutable outer binding.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/interior-mutability-intro/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"lifetime-elision","title":"Lifetime Elision","concept":"The common lifetime relationships Rust infers","summary":"The common lifetime relationships Rust infers.","rule":"Rust omits obvious lifetime annotations using a small set of rules.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/lifetime-elision/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"ownership-practice","id":"owned-or-borrowed","title":"Owned or Borrowed?","concept":"Choose a return type that matches the data flow","summary":"Choose a return type that matches the data flow.","rule":"Return a borrow when the result is a view into an input; return an owned value when new data is created or must escape independently.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/owned-or-borrowed/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"trait-objects","title":"Trait Objects","concept":"Choose behavior at runtime with dyn Trait","summary":"Choose behavior at runtime with dyn Trait.","rule":"A trait object stores a pointer to data and a table of methods.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/trait-objects/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"blanket-impls","title":"Blanket Implementations","concept":"Implement behavior for every matching type","summary":"Implement behavior for every matching type.","rule":"A generic `impl` can grant a trait to all types satisfying a bound.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/blanket-impls/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"default-trait-methods","title":"Default Trait Methods","concept":"Share behavior while allowing an override","summary":"Share behavior while allowing an override.","rule":"A trait may provide a method body that implementations inherit.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/default-trait-methods/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"generic-lifetimes","title":"Generic Lifetimes","concept":"Combine type bounds with borrow relationships","summary":"Combine type bounds with borrow relationships.","rule":"A function may be generic over both a data type and a lifetime.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/generic-lifetimes/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"iterator-adapters","title":"Iterator Pipelines","concept":"Transform lazily, then choose one consumer","summary":"Transform lazily, then choose one consumer.","rule":"Adapters such as map and filter describe work but do nothing until a consumer asks for values.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/iterator-adapters/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"closure-capture-modes","title":"Closure Capture Modes","concept":"Infer shared, mutable, or moved captures","summary":"Infer shared, mutable, or moved captures.","rule":"A closure borrows, mutably borrows, or moves each captured value according to its body.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/closure-capture-modes/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"abstraction-practice","id":"phantom-data","title":"Phantom Types","concept":"Track a compile-time state with no stored value","summary":"Track a compile-time state with no stored value.","rule":"PhantomData tells the type system that a zero-sized marker matters to ownership or state.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/ownership/phantom-data/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"api-boundaries","id":"fromstr-domain-values","title":"FromStr & Domain Values","concept":"A validated constructor behind a parsing trait","summary":"Convert raw text into a value that cannot represent an invalid port.","rule":"A conversion is useful when its output establishes an invariant, not just a new spelling.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/fromstr-domain-values/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"api-boundaries","id":"option-result-transpose","title":"Compose Optional Fallible Input","concept":"map, transpose, and explicit defaults","summary":"Keep missing configuration distinct from a configuration that is present but invalid.","rule":"Apply defaults to absence, not to every failure.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/option-result-transpose/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"ownership","unitId":"api-boundaries","id":"asref-borrowed-inputs","title":"Flexible Borrowed Inputs","concept":"AsRef without unnecessary ownership","summary":"Accept several string-like types when the operation only needs a borrowed view.","rule":"Ask for ownership only when the operation needs to keep or consume the value.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/ownership/asref-borrowed-inputs/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"projects","id":"modules","title":"Modules","concept":"Cargo.toml and sibling files","summary":"Modules split a crate into files, and privacy shapes the surface.","rule":"Items are private by default; `pub` is what exposes them.","minutes":14,"exerciseKind":"multiFile","url":"https://crabrix.com/learn/projects/modules/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"projects","id":"testing","title":"Testing","concept":"Unit and integration tests","summary":"Tests turn behaviour into executable evidence.","rule":"`#[cfg(test)]` selects test builds, including `cargo test --release`; ordinary builds exclude that module.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/testing/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"projects","id":"errors","title":"Error Design","concept":"Propagation and custom errors","summary":"Good errors preserve context and keep recovery near the caller.","rule":"Panic for a bug; `Result` for a situation the caller can act on.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/errors/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"projects","id":"dependencies","title":"Dependencies","concept":"crates.io, SemVer, and features","summary":"A dependency is a version requirement, not a fixed version.","rule":"\"1.2\" means >=1.2.0 and <2.0.0; the lockfile records what was actually chosen.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/dependencies/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"projects","id":"workspaces","title":"Workspaces","concept":"Many crates, one lockfile","summary":"A workspace builds several crates against one lockfile.","rule":"Workspace members share one lockfile, which records every resolved version; incompatible requirements can still select several.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/workspaces/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"pointers","id":"box","title":"Box<T>","concept":"Heap allocation and recursive types","summary":"`Box` moves a value to the heap behind a single owner.","rule":"`Box` gives a recursive or unsized value a known-size home.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/box/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"pointers","id":"rc-refcell","title":"Rc & RefCell","concept":"Shared ownership and interior mutability","summary":"`Rc` shares ownership; `RefCell` moves the borrow check to runtime.","rule":"`RefCell` moves the borrow rules to runtime; breaking them panics.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/rc-refcell/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"pointers","id":"deref-drop","title":"Deref & Drop","concept":"Making a type behave like a reference","summary":"Deref makes your type usable like a reference to another one.","rule":"Deref coercion applies repeatedly until the types line up.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/deref-drop/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"pointers","id":"cycles","title":"Reference Cycles","concept":"Weak<T> and leaks Rust cannot prevent","summary":"Rust prevents data races, not leaks — a cycle can still strand memory.","rule":"`Weak` does not keep a value alive, so `upgrade()` may return `None`.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/cycles/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"cargo-workflow","id":"package-layout","title":"Package Layout","concept":"Map Cargo targets to predictable source paths","summary":"Map Cargo targets to predictable source paths.","rule":"`src/main.rs` defines the default binary and `src/lib.rs` defines the library target.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/package-layout/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"cargo-workflow","id":"cargo-command-cycle","title":"Check, Build, Run","concept":"Choose the cheapest command that proves the next fact","summary":"Choose the cheapest command that proves the next fact.","rule":"`cargo check` proves type correctness without final code generation, build creates artifacts, and run executes a binary after building it.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/cargo-command-cycle/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"cargo-workflow","id":"dependency-kinds","title":"Dependency Kinds","concept":"Separate runtime, build, and test-only tools","summary":"Separate runtime, build, and test-only tools.","rule":"Normal dependencies become part of a target graph, build dependencies support build scripts, and dev dependencies exist for tests and examples.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/dependency-kinds/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"cargo-workflow","id":"feature-design","title":"Feature Design","concept":"Make optional capability additive and explicit","summary":"Make optional capability additive and explicit.","rule":"Cargo features are unified across a dependency graph, so disabling one consumer's feature may not disable it globally.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/feature-design/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"cargo-workflow","id":"lockfile-reproducibility","title":"Lockfile Reproducibility","concept":"Build the same resolved graph again","summary":"Build the same resolved graph again.","rule":"`Cargo.toml` describes allowed versions while `Cargo.lock` records the exact chosen graph.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/lockfile-reproducibility/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"project-quality","id":"integration-tests","title":"Integration Tests","concept":"Test the public API as an outside user","summary":"Test the public API as an outside user.","rule":"Files under `tests/` compile as separate crates and can only use the library's public API.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/integration-tests/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"project-quality","id":"error-context","title":"Error Context","concept":"Preserve a cause while explaining the failed operation","summary":"Preserve a cause while explaining the failed operation.","rule":"A useful error says what operation failed and retains the original cause.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/error-context/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"project-quality","id":"doc-examples","title":"Executable Documentation","concept":"Keep API examples checked by the test suite","summary":"Keep API examples checked by the test suite.","rule":"By default, `cargo test` compiles and runs Rust code fences in library documentation; `no_run` and `ignore` change that behavior.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/doc-examples/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"project-quality","id":"release-profiles","title":"Release Profiles","concept":"Tune optimization without changing source behavior","summary":"Tune optimization without changing source behavior.","rule":"Cargo profiles configure optimization, debug information, panic strategy, and more.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/projects/release-profiles/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"files-data","id":"buffered-line-input","title":"Buffered Line Input","concept":"BufRead, Cursor, and fallible iteration","summary":"Separate a streaming parser from the place its bytes come from.","rule":"A reader can fail between records; handle both I/O and parse errors.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/buffered-line-input/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"files-data","id":"paths-and-boundaries","title":"Paths & Boundaries","concept":"Path, PathBuf, and lexical validation","summary":"Treat a path as structured input and keep lexical checks distinct from filesystem authority.","rule":"Joining a path is not permission checking, and lexical validation does not resolve symlinks.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/paths-and-boundaries/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"files-data","id":"sandbox-file-roundtrip","title":"Save & Read a Text File","concept":"Fallible filesystem effects in a granted directory","summary":"Make the file effect explicit, return errors, and verify the bytes that came back.","rule":"A successful write is not a promise of crash-safe durability.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/sandbox-file-roundtrip/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"files-data","id":"validated-records","title":"Validate Data Records","concept":"A bounded text format with precise errors","summary":"Specify a small input format before implementing its parser.","rule":"Malformed records must not disappear from a successful report.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/validated-records/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"files-data","id":"serde-roundtrip-validation","title":"Serde: Decode, Validate, Encode","concept":"Serialization is not domain validation","summary":"Turn JSON into a transport type, validate it, and only then create a domain value.","rule":"Deserialization checks the transport shape; your domain invariants still need an explicit boundary.","minutes":20,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/serde-roundtrip-validation/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"reliability-labs","id":"properties-and-oracles","title":"Test Properties, Not Just Examples","concept":"An independent oracle and bounded generated cases","summary":"A normalization function should satisfy laws on many inputs, not only one expected output.","rule":"Use an independent oracle; repeating the implementation in the assertion repeats its bugs.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/properties-and-oracles/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"reliability-labs","id":"hostile-parser-inputs","title":"Adversarial Parser Tests","concept":"Reject malformed data without panic or silent truncation","summary":"Start with a grammar, then make a test table for the ways input can violate it.","rule":"No panic is necessary for an expected invalid input, but success must still mean the whole record was accepted.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/hostile-parser-inputs/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"reliability-labs","id":"unicode-regression-tests","title":"Keep a Unicode Regression","concept":"A minimal failure that survives a refactor","summary":"Turn a real boundary failure into a small, named case that protects future changes.","rule":"Define the unit before testing a text limit: bytes, scalar values, and grapheme clusters differ.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/unicode-regression-tests/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"library-contracts","id":"public-api-compatibility","title":"Evolving a Public API","concept":"Compile the unchanged consumer before calling an API change compatible","summary":"Compile the unchanged consumer before calling an API change compatible.","rule":"Keep the original caller's signatures and promised behavior across supported releases.","minutes":24,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/public-api-compatibility/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"library-contracts","id":"msrv-verification","title":"MSRV Is a Tested Promise","concept":"A manifest declaration needs evidence from the minimum supported compiler","summary":"A manifest declaration needs evidence from the minimum supported compiler.","rule":"Test the actual minimum compiler and supported profiles; metadata alone is not evidence.","minutes":22,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/msrv-verification/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"library-contracts","id":"feature-compatibility-matrix","title":"The Downstream Feature Matrix","concept":"Optional capability must preserve the old consumer across the supported feature sets","summary":"Optional capability must preserve the old consumer across the supported feature sets.","rule":"Keep the baseline API working with defaults, minimal builds and supported feature unions.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/feature-compatibility-matrix/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-git","id":"route-git-review","title":"Review the Exact Change","concept":"Distinguish changed, added and deleted paths","summary":"Distinguish changed, added and deleted paths.","rule":"Compare source snapshots by path and content before selecting a commit.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-git-review/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-git","id":"route-git-select","title":"Commit Only Reviewed Paths","concept":"Construct the selected commit tree","summary":"Construct the selected commit tree.","rule":"An unselected worktree edit must not silently enter a selected-path commit.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-git-select/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-git","id":"route-git-branch","title":"Switch Without Losing Work","concept":"Protect dirty worktrees during checkout","summary":"Protect dirty worktrees during checkout.","rule":"Require a clean worktree before this profile replaces files from another branch.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-git-branch/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-git","id":"route-git-recover","title":"Recover One Historical File","concept":"Restore narrowly from a known revision","summary":"Restore narrowly from a known revision.","rule":"A one-file restore must preserve every unrelated current edit.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-git-recover/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-cli","id":"route-cli-arguments","title":"Parse a CLI Contract","concept":"Preserve arguments and reject ambiguous input","summary":"Preserve arguments and reject ambiguous input.","rule":"Parse the entire invocation before applying any side effect.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-cli-arguments/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-cli","id":"route-cli-config","title":"Resolve Configuration Once","concept":"Apply explicit configuration precedence","summary":"Apply explicit configuration precedence.","rule":"Choose flag over environment over default, then validate the chosen value.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-cli-config/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-cli","id":"route-cli-streams","title":"Process Bounded Standard Input","concept":"Treat input as data with resource limits","summary":"Treat input as data with resource limits.","rule":"Check byte limits before retaining input and validate complete records.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-cli-streams/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-cli","id":"route-cli-exit","title":"Separate Output from Failure","concept":"Return observable stdout, stderr and exit status","summary":"Return observable stdout, stderr and exit status.","rule":"Data goes to stdout; a failure has stderr context and a nonzero status.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-cli-exit/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-http","id":"route-http-routing","title":"Route Method and Path Together","concept":"Separate unknown routes from disallowed methods","summary":"Separate unknown routes from disallowed methods.","rule":"Resolve the resource first, then the allowed HTTP method.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-http-routing/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-http","id":"route-http-limits","title":"Validate Before Applying Effects","concept":"Check declared and actual request size","summary":"Check declared and actual request size.","rule":"A body-length mismatch is a framing error; an exceeded limit is a resource error.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-http-limits/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-http","id":"route-http-json","title":"Encode a Valid JSON Boundary","concept":"Escape JSON strings without corrupting Unicode","summary":"Escape JSON strings without corrupting Unicode.","rule":"Escape control characters, quotes and backslashes while preserving Unicode data.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-http-json/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-http","id":"route-http-idempotency","title":"Retry Without Duplicating Tasks","concept":"Bind an idempotency key to one request payload","summary":"Bind an idempotency key to one request payload.","rule":"Reuse a stored result only when the key and original payload agree.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-http-idempotency/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-sql","id":"route-sql-schema","title":"Make Invalid Rows Impossible","concept":"Enforce domain invariants in a real database","summary":"Enforce domain invariants in a real database.","rule":"Validate in Rust for helpful errors and in SQL for every writer.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-sql-schema/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-sql","id":"route-sql-query","title":"Query the Right Rows in a Stable Order","concept":"Filter, join and order by the intended relationship","summary":"Filter, join and order by the intended relationship.","rule":"Specify both the inclusion rule and deterministic ordering.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-sql-query/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-sql","id":"route-sql-parameters","title":"Bind Values Instead of SQL Syntax","concept":"Keep untrusted text in a parameter slot","summary":"Keep untrusted text in a parameter slot.","rule":"A title is data even when it contains quotes or SQL-looking text.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-sql-parameters/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-sql","id":"route-sql-transactions","title":"Commit Related Changes Atomically","concept":"Roll back a failed multi-write operation","summary":"Roll back a failed multi-write operation.","rule":"All related writes belong to one transaction with an observable failure path.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-sql-transactions/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-diagnostics","id":"route-diag-context","title":"Add Context Without Leaking Secrets","concept":"Redact sensitive diagnostic fields","summary":"Redact sensitive diagnostic fields.","rule":"An error should identify the operation without copying credentials into logs.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-diag-context/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-diagnostics","id":"route-diag-correlation","title":"Propagate One Request Identity","concept":"Validate a bounded correlation ID","summary":"Validate a bounded correlation ID.","rule":"Use the same validated ID across a request and its child operations.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-diag-correlation/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-diagnostics","id":"route-diag-latency","title":"Measure the Tail, Not Just the Average","concept":"Compute an explicitly defined latency percentile","summary":"Compute an explicitly defined latency percentile.","rule":"State the percentile convention and preserve the original measurements.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-diag-latency/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-diagnostics","id":"route-diag-retries","title":"Bound the Retry Budget","concept":"Retry transient failures within attempt and time limits","summary":"Retry transient failures within attempt and time limits.","rule":"A retry needs a transient failure, remaining attempts and a deadline budget.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-diag-retries/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-delivery","id":"route-delivery-gates","title":"Make Checks Block Delivery","concept":"Require all declared release checks","summary":"Require all declared release checks.","rule":"An absent or failed required check cannot be treated as a green release.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-delivery-gates/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-delivery","id":"route-delivery-config","title":"Validate Before Starting the Service","concept":"Reject invalid deployment configuration","summary":"Reject invalid deployment configuration.","rule":"A deployment configuration must fail before the service accepts traffic.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-delivery-config/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-delivery","id":"route-delivery-artifacts","title":"Bind an Artifact to Its Source","concept":"Verify release identity and digest metadata","summary":"Verify release identity and digest metadata.","rule":"A filename or version label does not prove which bytes were tested.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-delivery-artifacts/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"projects","unitId":"route-delivery","id":"route-delivery-rollback","title":"Release, Observe and Recover","concept":"Keep a known-good version until the candidate is healthy","summary":"Keep a known-good version until the candidate is healthy.","rule":"A failed readiness check preserves the previous active version.","minutes":25,"exerciseKind":"runnable","url":"https://crabrix.com/learn/projects/route-delivery-rollback/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"threads","id":"concurrency","title":"Threads","concept":"spawn, join, and move closures","summary":"Threads run in parallel, and ownership decides what may cross.","rule":"`thread::spawn` requires a `Send + 'static` closure; `move` captures by value and does not extend borrowed lifetimes.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/concurrency/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"threads","id":"channels","title":"Channels","concept":"Message passing with mpsc","summary":"Do not communicate by sharing memory; share memory by communicating.","rule":"A receiver iterator finishes after every sender is dropped and all queued messages have been received.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/channels/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"threads","id":"shared-state","title":"Shared State","concept":"Mutex, RwLock, and Arc","summary":"`Arc` shares the value; `Mutex` makes mutation through it safe.","rule":"The lock guard unlocks on drop, so there is no unlock to forget.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/shared-state/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"threads","id":"send-sync","title":"Send & Sync","concept":"The traits behind thread safety","summary":"Two auto traits decide what may cross a thread boundary.","rule":"`T` is `Sync` exactly when `&T` is `Send`.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/send-sync/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async","id":"futures","title":"Futures","concept":"async fn, await, and laziness","summary":"An `async` function returns a future that has not run yet.","rule":"Futures are lazy: no poll, no progress.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/futures/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async","id":"async-runtime","title":"Runtimes","concept":"Why async needs an executor","summary":"Rust ships the `async` syntax but not the engine that drives it.","rule":"std defines `Future`; the executor is a library decision.","minutes":18,"exerciseKind":"runnable","url":"https://crabrix.com/learn/concurrency/async-runtime/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async","id":"async-patterns","title":"Async Patterns","concept":"join, select, and cancellation","summary":"Concurrency inside one task comes from combinators, not threads.","rule":"Dropping an owned operation future stops polling it; dropping Tokio’s `JoinHandle` detaches its spawned task.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/async-patterns/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"concurrency-safety","id":"scoped-threads","title":"Scoped Threads","concept":"Borrow local data while threads are guaranteed to join","summary":"Borrow local data while threads are guaranteed to join.","rule":"`thread::scope` proves every spawned thread finishes before borrowed stack data disappears.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/scoped-threads/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"concurrency-safety","id":"mutex-poisoning","title":"Mutex Poisoning","concept":"Notice a panic that may leave state inconsistent","summary":"Notice a panic that may leave state inconsistent.","rule":"A standard `Mutex` becomes poisoned when a holder panics.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/mutex-poisoning/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"concurrency-safety","id":"atomics-basics","title":"Atomic State","concept":"Update one shared value without a lock","summary":"Update one shared value without a lock.","rule":"Atomic operations are indivisible but still need an ordering that describes cross-thread visibility.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/atomics-basics/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"concurrency-safety","id":"deadlock-avoidance","title":"Deadlock Avoidance","concept":"Keep a global lock order and short critical sections","summary":"Keep a global lock order and short critical sections.","rule":"Rust prevents data races, not deadlocks.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/deadlock-avoidance/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async-reliability","id":"pinning-intuition","title":"Pinning Intuition","concept":"Distinguish a pinned !Unpin pointee from an Unpin value and its movable pointer wrapper","summary":"Promise that a value will not move in memory.","rule":"`Pin` constrains moves of a pointee that relies on pinning. `Unpin` types such as `String` opt out of that restriction; moving the pointer wrapper itself is a separate matter.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/pinning-intuition/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async-reliability","id":"async-cancellation","title":"Cancellation Safety","concept":"Expect a future to be dropped at any await point","summary":"Expect a future to be dropped at any `await` point.","rule":"Selecting or timing out a future may drop it before completion.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/async-cancellation/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async-reliability","id":"blocking-async","title":"Blocking in Async Code","concept":"Keep executor threads available to poll other futures","summary":"Keep executor threads available to poll other futures.","rule":"A blocking call occupies an executor worker without yielding, so unrelated tasks can stall.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/concurrency/blocking-async/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async-operations","id":"joinset-task-ownership","title":"Own Tasks with JoinSet","concept":"Completion order, errors, and task lifetime","summary":"Keep the tasks you start in a collection whose lifetime and results are explicit.","rule":"Spawning starts an independent task; awaiting its result is a separate responsibility.","minutes":20,"exerciseKind":"runnable","url":"https://crabrix.com/learn/concurrency/joinset-task-ownership/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async-operations","id":"semaphore-backpressure","title":"Bound Work Before Spawning","concept":"Semaphore permits and bounded queues","summary":"Put the limit before the expensive resource allocation, not after an unbounded queue has formed.","rule":"A concurrency limit and a queue-size limit protect different resources.","minutes":20,"exerciseKind":"runnable","url":"https://crabrix.com/learn/concurrency/semaphore-backpressure/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"concurrency","unitId":"async-operations","id":"graceful-shutdown-protocol","title":"A Graceful Shutdown Protocol","concept":"Stop admission, signal, and wait","summary":"Cancellation becomes reliable when the operation owns a protocol and a completion point.","rule":"Requesting shutdown is not the same as observing that all workers have stopped.","minutes":20,"exerciseKind":"runnable","url":"https://crabrix.com/learn/concurrency/graceful-shutdown-protocol/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"meta","id":"declarative-macros","title":"macro_rules!","concept":"Pattern-based code generation","summary":"macro_rules! matches syntax patterns and expands to code.","rule":"Macros work on tokens before type checking, which is why they can vary in arity.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/declarative-macros/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"meta","id":"proc-macros","title":"Procedural Macros","concept":"Derive, attribute, and function macros","summary":"A procedural macro is a compiler plugin written in Rust.","rule":"Proc macros execute at compile time, so they need a host-native build.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/proc-macros/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"meta","id":"cfg-features","title":"cfg & Features","concept":"Compiling different code per target","summary":"cfg decides which code is compiled at all.","rule":"`#[cfg(...)]` excludes selected code before name and type checking, but source syntax still has to parse. Disabling default features on one dependency edge does not prohibit another edge from enabling them.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/cfg-features/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"systems","id":"unsafe","title":"unsafe Rust","concept":"Five powers and their invariants","summary":"`unsafe` unlocks five operations; it does not turn off the borrow checker.","rule":"`unsafe` is a claim about an invariant, not permission to skip the rules.","minutes":21,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/unsafe/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"systems","id":"ffi","title":"FFI","concept":"extern \"C\", repr(C), and raw pointers","summary":"FFI needs explicit ABI, layout, ownership and validity contracts; unsafe code must uphold the foreign function requirements.","rule":"`repr(C)` follows C layout rules for the target; it is not a recursive layout, ownership or pointer-validity guarantee.","minutes":21,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/ffi/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"systems","id":"performance","title":"Performance","concept":"Allocation, iterators, and measuring","summary":"Rust is fast by default; the wins left are allocation and algorithm.","rule":"Measure representative workloads with the target optimization profile; debug timings do not predict release performance.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/performance/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"systems","id":"idioms","title":"Rust Idioms","concept":"Newtype, builder, and typestate","summary":"Rust's patterns push mistakes from runtime to compile time.","rule":"A newtype costs nothing at runtime and buys a real compile-time guarantee.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/idioms/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"macro-design","id":"macro-hygiene","title":"Macro Hygiene","concept":"Resolve generated names without accidental capture","summary":"Resolve generated names without accidental capture.","rule":"Rust macros track syntax context so identifiers introduced by a macro do not casually collide with names at the call site.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/macro-hygiene/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"macro-design","id":"token-trees","title":"Token Trees","concept":"Match Rust syntax as nested tokens, not raw text","summary":"Match Rust syntax as nested tokens, not raw text.","rule":"`macro_rules!` consumes token trees with balanced delimiters.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/token-trees/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"macro-design","id":"proc-macro-boundaries","title":"Proc-Macro Boundaries","concept":"Separate host-time generation from target code","summary":"Separate host-time generation from target code.","rule":"A procedural macro is compiled for and runs on the build host, then emits tokens for the target crate.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/proc-macro-boundaries/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"unsafe-engineering","id":"raw-pointers","title":"Raw Pointers","concept":"Represent an address without borrow guarantees","summary":"Represent an address without borrow guarantees.","rule":"Creating `*const T` or `*mut T` is safe; dereferencing one is `unsafe` because validity, alignment, initialization, and aliasing are now the programmer's proof obligations.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/raw-pointers/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"unsafe-engineering","id":"repr-layout","title":"Representation & Layout","concept":"Make a data layout contract explicit at a boundary","summary":"Make a data layout contract explicit at a boundary.","rule":"Rust's default layout may change for optimization and is not an FFI contract.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/repr-layout/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"unsafe-engineering","id":"unsafe-traits","title":"Unsafe Traits","concept":"Make an implementation promise other unsafe code relies on","summary":"Make an implementation promise other `unsafe` code relies on.","rule":"An `unsafe` trait means incorrect implementation can cause undefined behavior in code that trusts it.","minutes":21,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/unsafe-traits/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"unsafe-engineering","id":"benchmarking-profiling","title":"Benchmark & Profile","concept":"Find the real bottleneck before optimizing","summary":"Find the real bottleneck before optimizing.","rule":"A benchmark measures a stable workload; a profiler explains where its time or allocations go.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/systems/benchmarking-profiling/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"wasm-wasi","id":"wasm-host-boundaries","title":"WASM Is Not the Browser API","concept":"Targets, host imports, and local execution","summary":"A WebAssembly module runs with the imports its host supplies, not with every capability of the computer.","rule":"Compilation target and host imports determine what a module can do.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/systems/wasm-host-boundaries/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"wasm-wasi","id":"wasm-linear-memory","title":"Linear Memory Boundaries","concept":"Checked offsets, lengths, and borrowed slices","summary":"A guest pointer is an offset into guest memory, not a host pointer you can blindly dereference.","rule":"Check offset plus length without overflow before making a borrowed view.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/systems/wasm-linear-memory/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"systems","unitId":"wasm-wasi","id":"runtime-resource-budgets","title":"Budget a Local Runtime","concept":"Independent CPU, memory, output, and storage limits","summary":"Local execution still needs independent limits for the resources a guest can consume.","rule":"A timeout does not replace memory, output, or filesystem quotas.","minutes":16,"exerciseKind":"runnable","url":"https://crabrix.com/learn/systems/runtime-resource-budgets/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-language","id":"q-ownership","title":"Explain Ownership","concept":"Moves, Copy, Drop, and scope","summary":"Explaining ownership well means naming the guarantee, not the syntax.","rule":"Ownership tracks resource responsibility; move, borrow and clone express different contracts.","minutes":13,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-ownership/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-language","id":"q-borrowing","title":"Why Borrowing Works","concept":"Aliasing and mutation rules","summary":"The borrowing answer is about aliasing versus mutation.","rule":"Aliasing XOR mutation, checked over the region a borrow is used.","minutes":14,"exerciseKind":"borrowDiagnostic","url":"https://crabrix.com/learn/interview/q-borrowing/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-language","id":"q-lifetimes","title":"Lifetime Reasoning","concept":"Relationships, not object duration","summary":"Lifetimes are about relationships, and saying so is the answer.","rule":"A lifetime constrains borrows; it never keeps anything alive.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-lifetimes/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-language","id":"q-option-result","title":"Option vs Result","concept":"Absence, failure, and propagation","summary":"Pick the type that matches what the caller must decide.","rule":"`Option`: absence is normal. `Result`: the caller needs the reason.","minutes":13,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-option-result/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-systems","id":"q-send-sync","title":"Send and Sync","concept":"Thread-safety marker traits","summary":"Two marker traits decide what may cross a thread boundary.","rule":"T is `Sync` exactly when &T is `Send`.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-send-sync/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-systems","id":"q-box-rc-arc","title":"Box, Rc, and Arc","concept":"Ownership and allocation choices","summary":"Three pointers, three different ownership questions.","rule":"Pick by ownership count first, then by thread boundary.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-box-rc-arc/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-systems","id":"q-dyn-generics","title":"dyn Trait vs Generics","concept":"Dispatch and code size tradeoffs","summary":"Generics preserve concrete types; trait objects provide a common interface with dynamic dispatch.","rule":"Choose dispatch from API flexibility, ownership and measured performance; neither choice guarantees a smaller or faster program.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-dyn-generics/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-systems","id":"q-unsafe","title":"Reasoning About unsafe","concept":"Sound abstractions and invariants","summary":"`unsafe` is a claim about an invariant, not a disabled checker.","rule":"`unsafe` moves the obligation to you; it never removes it.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-unsafe/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-concurrency","id":"q-atomics","title":"Atomics and Ordering","concept":"Relaxed, Acquire/Release, SeqCst","summary":"An atomic is a value several threads may touch without a lock.","rule":"Atomicity and ordering are separate promises; Relaxed gives only the first.","minutes":21,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-atomics/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-concurrency","id":"q-deadlock","title":"Deadlocks","concept":"What the borrow checker does not prevent","summary":"Rust prevents data races, not deadlocks.","rule":"Data-race freedom is a compile-time guarantee; deadlock freedom is a design one.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-deadlock/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-concurrency","id":"q-channels-vs-mutex","title":"Channels vs Mutex","concept":"Moving ownership or sharing it","summary":"Share memory by communicating, or communicate by sharing memory.","rule":"Channels move ownership; a mutex shares it. Pick by data flow.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-channels-vs-mutex/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-concurrency","id":"q-async-vs-threads","title":"Async vs Threads","concept":"Waiting versus computing","summary":"Async makes waiting cheap and threads run work in parallel; neither owns all I/O or all CPU.","rule":"Choose concurrency and parallelism from the workload; async tasks still execute on threads.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-async-vs-threads/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-concurrency","id":"q-blocking-async","title":"Blocking an Executor","concept":"Why one sync call stalls a runtime","summary":"One blocking call can stall an entire async runtime.","rule":"Never block an executor thread: yield, or move the work off it.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-blocking-async/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-concurrency","id":"q-cancellation","title":"Cancellation Safety","concept":"Dropping a future mid-await","summary":"In Rust, an async task is cancelled by dropping its future.","rule":"Cancellation is a drop; state between awaits must survive it or not exist.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-cancellation/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-stack-heap","title":"Stack and Heap","concept":"Where values live and what a move copies","summary":"Ownership and storage location are separate questions; draw the handle and the allocation.","rule":"A move transfers ownership; handle placement and optimized instructions are not language guarantees.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-stack-heap/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-virtual-memory","title":"Virtual Memory","concept":"Pages, faults, and resident size","summary":"Every pointer you see is virtual, and the kernel decides what it means.","rule":"Virtual size, committed memory and residency are different measurements; inspect the actual platform.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-virtual-memory/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-syscalls","title":"Syscalls and Buffering","concept":"Where the cost of IO actually is","summary":"A syscall is a controlled trip into the kernel, and it is not free.","rule":"Buffering can combine small writes; measure the boundary cost and handle errors explicitly.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-syscalls/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-tcp-udp","title":"TCP vs UDP","concept":"Streams, datagrams, and trade-offs","summary":"TCP gives you a reliable ordered stream; UDP gives you datagrams and nothing else.","rule":"TCP: ordered, reliable, head-of-line blocked. UDP: messages, no promises.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-tcp-udp/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-http-versions","title":"HTTP/1.1, 2, and 3","concept":"Head-of-line blocking per layer","summary":"Each HTTP version fixed the blocking problem one layer lower.","rule":"HTTP/2 shares TCP’s ordered byte delivery; QUIC separates delivery of different streams.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-http-versions/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-tls","title":"What TLS Guarantees","concept":"Identity, confidentiality, integrity","summary":"TLS gives confidentiality, integrity, and identity — in that order of confusion.","rule":"Encryption without verified identity stops eavesdroppers, not an active impostor.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-tls/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-platform","id":"q-backpressure","title":"Backpressure","concept":"Bounded queues and load shedding","summary":"A queue with no limit is a crash with a delay.","rule":"Every queue needs a bound and a policy for what happens at that bound.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-backpressure/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-data","id":"q-acid","title":"Transactions and Isolation","concept":"Which anomaly each level allows","summary":"Isolation is the letter in ACID people actually get wrong.","rule":"Choose transaction boundaries and isolation for a named invariant on a named database.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-acid/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-data","id":"q-indexes","title":"Indexes and B-trees","concept":"Composite index selectivity, planner choices, skip scans and write cost","summary":"An index is a sorted structure that trades write cost for read speed.","rule":"Leading columns often make a composite B-tree scan selective, but later-column predicates can still use an index, including through skip scan. The actual choice depends on the database, statistics and query plan.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-indexes/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-data","id":"q-cap","title":"CAP in Practice","concept":"What happens during a partition","summary":"CAP is about what happens during a partition, not a menu of three.","rule":"Specify the consistency model and failure protocol; quorum arithmetic alone is insufficient.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-cap/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-data","id":"q-idempotency","title":"Idempotency and Retries","concept":"Making at-least-once safe","summary":"A retry is only safe if the operation is idempotent.","rule":"An idempotency key needs an enforced request/outcome contract, not just a header.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-idempotency/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-data","id":"q-caching","title":"Caching and Invalidation","concept":"Staleness budgets and stampedes","summary":"Caching is easy; deciding when the cache is wrong is not.","rule":"Every cache needs a bound, an eviction policy, and a stated staleness budget.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-caching/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-craft","id":"q-complexity","title":"Complexity in Practice","concept":"Constants, cache, and amortised cost","summary":"Big-O tells you how something scales, not how fast it is.","rule":"Complexity predicts growth; constants decide which one is faster today.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-complexity/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-craft","id":"q-hashmap","title":"Hashing and Collisions","concept":"Why Rust seeds its hasher","summary":"A hash map is O(1) until an adversary picks your keys.","rule":"Hash choice is a security decision whenever the keys are attacker-controlled.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-hashmap/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-craft","id":"q-testing-strategy","title":"Choosing a Test","concept":"Unit, property, fuzz, integration","summary":"Different bugs need different tests, and naming them is the answer.","rule":"Choose tests for named failure modes and independent evidence; test labels alone prove little.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-testing-strategy/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-craft","id":"q-api-design","title":"API Design and Semver","concept":"Making misuse impossible to express","summary":"A good API makes the wrong call impossible, not merely documented.","rule":"Encode the invariant in the type; documentation is not enforcement.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-api-design/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-craft","id":"q-perf-profiling","title":"Profiling First","concept":"Measure, change one thing, measure","summary":"Measure first: the bottleneck is almost never where it feels like it is.","rule":"Profile, change one thing, measure again. Guessing is not optimising.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-perf-profiling/","playground":false,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-craft","id":"q-ffi-abi","title":"FFI and ABI","concept":"Ownership across the C boundary","summary":"FFI needs explicit ABI, layout, ownership and validity contracts; unsafe code must uphold the foreign function requirements.","rule":"repr(C) fixes layout; ownership across the boundary is documentation you enforce.","minutes":21,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-ffi-abi/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-live-coding","id":"q-two-sum-rust","title":"Live Coding: Two Sum","concept":"Clarify duplicates, indices, and complexity first","summary":"Clarify duplicates, indices, and complexity first.","rule":"State the contract before reaching for `HashMap`: may one index be reused, can values repeat, and what should happen when no pair exists? Then explain the O(n) time and O(n) space tradeoff.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-two-sum-rust/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-live-coding","id":"q-lru-design","title":"Design an LRU Cache","concept":"Combine lookup speed with recency updates","summary":"Combine lookup speed with recency updates.","rule":"Explain why a hash map alone cannot evict the least recent key in O(1).","minutes":21,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-lru-design/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-live-coding","id":"q-parser-design","title":"Design a Parser","concept":"Separate tokenization, grammar, and diagnostics","summary":"Separate tokenization, grammar, and diagnostics.","rule":"A strong answer defines input ownership, source spans, recovery strategy, and whether the parser returns a tree or events.","minutes":19,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-parser-design/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-live-coding","id":"q-debugging-session","title":"Debugging Out Loud","concept":"Form a hypothesis and request one discriminating fact","summary":"Form a hypothesis and request one discriminating fact.","rule":"Do not edit randomly during an interview.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-debugging-session/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-delivery","id":"q-tradeoff-communication","title":"Communicate a Tradeoff","concept":"Tie a choice to constraints and a failure mode","summary":"Tie a choice to constraints and a failure mode.","rule":"A senior answer does not call one tool universally best.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-tradeoff-communication/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-delivery","id":"q-requirements","title":"Clarify Requirements","concept":"Turn a broad prompt into boundaries and invariants","summary":"Turn a broad prompt into boundaries and invariants.","rule":"Ask about scale, latency, durability, consistency, trust boundaries, and expected failure.","minutes":16,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-requirements/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-delivery","id":"q-code-review","title":"Review Rust Code","concept":"Prioritize correctness, API contracts, then style","summary":"Prioritize correctness, API contracts, then style.","rule":"Start with soundness, data loss, and observable behavior before naming cosmetic issues.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-code-review/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-delivery","id":"q-postmortem","title":"Explain an Incident","concept":"Describe conditions and controls, not one guilty person","summary":"Describe conditions and controls, not one guilty person.","rule":"A useful postmortem separates trigger, contributing conditions, detection gaps, impact, and durable actions.","minutes":18,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-postmortem/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-values","id":"q-interior-mutability","title":"Cell, RefCell and Runtime Borrows","concept":"Interior mutability without confusing Send and Sync","summary":"Interior mutability changes how access is checked; it does not remove the safety contract.","rule":"Runtime borrow checking still enforces exclusivity; ownership transfer and concurrent sharing have different trait bounds.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-interior-mutability/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-values","id":"q-copy-clone-cow","title":"Copy, Clone and Cow","concept":"Implicit duplication, explicit cloning and lazy ownership","summary":"Ask which bytes are shared, copied or allocated before choosing an ownership conversion.","rule":"`Clone` semantics depend on the type; `Cow` delays ownership conversion until an operation needs it.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-copy-clone-cow/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-values","id":"q-utf8-boundaries","title":"UTF-8 and Editor Offsets","concept":"Bytes, Unicode scalars, graphemes and UTF-16 positions","summary":"Text positions need a declared coordinate system before they can be exchanged or sliced.","rule":"Validate the coordinate system, source revision and UTF-8 boundaries before slicing text.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-utf8-boundaries/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-values","id":"q-iterator-ownership","title":"Iterator Ownership and Laziness","concept":"Borrowing iteration, consuming iteration and deliberate collection","summary":"An iterator pipeline describes work; the item type and terminal operation determine ownership and execution.","rule":"Trace the receiver, iterator item type and consumer before making a move or allocation claim.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-iterator-ownership/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-async-contracts","id":"q-closure-traits","title":"Fn, FnMut and FnOnce","concept":"Capture ownership and how a closure uses its environment","summary":"The call trait follows what the closure does with captures, not just whether `move` appears.","rule":"`move` controls capture ownership; the closure body determines its call-trait capabilities.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-closure-traits/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-async-contracts","id":"q-pin-future","title":"Pin, Unpin and Future Polling","concept":"Stable pointees without confusing the pointer with its allocation","summary":"`Pin` constrains moving a pointee through a pointer; moving that pointer can remain valid.","rule":"`Pin` protects the pointee’s address-sensitive contract; `Unpin` governs safe access that can move it.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-pin-future/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-async-contracts","id":"q-future-send","title":"Send Across await","concept":"Task state, 'static bounds and non-Send locals","summary":"Inspect which values survive a suspension before deciding whether a future satisfies `Send`.","rule":"`Send` is determined by the future’s actual retained state; `async move` does not upgrade non-`Send` types.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-future-send/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-async-contracts","id":"q-async-locks","title":"Lock Scope Across await","concept":"Synchronous blocking, suspension and cancellation-safe critical sections","summary":"Keep synchronous critical sections short and make suspension while holding a guard an explicit design decision.","rule":"Waiting for a lock, holding a lock during suspension and doing CPU work are separate concerns.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-async-locks/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-api-boundaries","id":"q-async-traits","title":"Async Traits and dyn Compatibility","concept":"Native async methods, returned futures and explicit type erasure","summary":"Native async trait methods and dynamic dispatch are separate interface choices.","rule":"Check dyn compatibility, future lifetime and `Send` bounds independently.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-async-traits/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-api-boundaries","id":"q-error-boundaries","title":"Error Types at API Boundaries","concept":"Absence, invalid input and contextual failure","summary":"An error type should preserve the distinctions the caller needs to handle.","rule":"Choose error structure from caller decisions; absence, failure and defaulting are different policies.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-error-boundaries/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-api-boundaries","id":"q-trait-coherence","title":"Orphan Rules and Newtypes","concept":"Implementing foreign traits without conflicting implementations","summary":"A local wrapper creates a distinct type whose behaviour your crate can own.","rule":"A newtype creates a distinct local type; an alias only gives an existing type another name.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-trait-coherence/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"interview","unitId":"interview-api-boundaries","id":"q-integer-boundaries","title":"Integer Boundaries and Conversion","concept":"Checked arithmetic and deliberate narrowing policies","summary":"Input bounds and arithmetic policy are part of the algorithm’s contract.","rule":"Choose the numeric domain and overflow policy explicitly, and widen before the operation when that is the proof.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/interview/q-integer-boundaries/","playground":true,"bridgeFrom":null,"credits":[],"appAvailability":"released"},{"courseId":"rust-for-c-developers","unitId":"c-rust-at-a-glance","id":"c-what-rust-is","title":"What Rust Is, from C","concept":"Native code and the same machine, with checks before it runs","summary":"Rust compiles to native code like C, with no garbage collector and no virtual machine; what changes is that rustc proves memory safety for safe code before the program runs.","rule":"Rust is a compiled, statically typed language without a garbage collector: rustc checks types, ownership and borrowing before the program runs, then produces a native executable.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-what-rust-is/","playground":true,"bridgeFrom":"c","credits":["basics/what-is-rust"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-rust-at-a-glance","id":"c-what-safe-rust-rules-out","title":"What Safe Rust Rules Out","concept":"Undefined behaviour excluded, bugs still possible","summary":"Safe Rust rules out the memory and thread bugs that are undefined behaviour in C, but not leaks, deadlocks, panics or wrong logic.","rule":"Safe Rust has no undefined behaviour: use after free, double free, dangling references, out-of-bounds access, null dereference, uninitialised reads and data races are rejected or checked; leaks, deadlocks, panics, logic errors and wrapping arithmetic in release builds are not.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-what-safe-rust-rules-out/","playground":true,"bridgeFrom":"c","credits":[],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-rust-at-a-glance","id":"c-rustc-diagnostics","title":"Reading rustc Diagnostics","concept":"Compile-time errors instead of run-time crashes","summary":"Where a C program compiles and crashes later, rustc stops with an error code, the exact spans involved and a suggested fix; reading them in order is a skill worth learning first.","rule":"Repair the first causal error before chasing its downstream messages: read its code and primary span, then the labels, notes and help, fix the cause and recompile.","minutes":11,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-rustc-diagnostics/","playground":true,"bridgeFrom":"c","credits":["basics/compiler-feedback"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-syntax","id":"c-printf-to-println","title":"From printf to println!","concept":"Format strings checked at compile time","summary":"`println!` checks its format string against its arguments while compiling; `printf` trusts you until run time.","rule":"`println!` is a macro: placeholders and arguments are matched during compilation, so a missing or mistyped argument is a compile error, not undefined behaviour.","minutes":9,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-printf-to-println/","playground":true,"bridgeFrom":"c","credits":["basics/hello-rust","basics/print-formatting"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-syntax","id":"c-const-by-default","title":"const by Default","concept":"Immutable bindings, mut and shadowing","summary":"In Rust a binding is immutable unless you write `mut`, and a new `let` can reuse a name for a new value or even a new type.","rule":"`let` bindings are immutable by default; `mut` opts in to mutation, and shadowing with a new `let` creates a new binding instead of changing the old one.","minutes":8,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-const-by-default/","playground":true,"bridgeFrom":"c","credits":["basics/variables"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-syntax","id":"c-integer-overflow-and-casts","title":"Integer Overflow and Casts","concept":"Defined overflow policy and explicit conversions","summary":"Rust never converts between integer types silently, and overflow is always defined: a panic in debug builds, wrapping in release builds, or exactly the policy you call.","rule":"Integer types never mix implicitly; choose the overflow policy (`checked_`, `wrapping_`, `saturating_`) and the conversion (`From`, `TryFrom`, `as`) explicitly.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-integer-overflow-and-casts/","playground":true,"bridgeFrom":"c","credits":["basics/number-types","basics/operators"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-syntax","id":"c-functions-are-expressions","title":"Functions Are Expressions","concept":"Tail values replace return and the ternary","summary":"A Rust block evaluates to its last expression, so functions return without `return`, and `if` replaces the ternary operator.","rule":"A block's value is its final expression without a semicolon; adding the semicolon turns it into a statement, and the block evaluates to `()`.","minutes":10,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-functions-are-expressions/","playground":true,"bridgeFrom":"c","credits":["basics/functions","basics/block-expressions"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-syntax","id":"c-for-loops-to-ranges","title":"From for(;;) to Ranges","concept":"Ranges, iterators and loop with a value","summary":"`for` iterates over ranges and collections, `..=` includes the end safely, and `loop` can hand a value out with `break`.","rule":"`for` iterates over a range or collection; `a..b` excludes `b`, `a..=b` includes it, and `loop` with `break value` replaces sentinel variables.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-for-loops-to-ranges/","playground":true,"bridgeFrom":"c","credits":["basics/loops","basics/ranges"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-memory","id":"c-malloc-free-to-ownership","title":"From malloc/free to Ownership","concept":"One owner frees, exactly once","summary":"Every heap value in Rust has exactly one owner; passing it by value moves ownership, and the end of the owner's scope frees it exactly once.","rule":"One value has one owner; a move transfers ownership and ends the old binding, and the remaining owners drop in reverse declaration order at the end of their scope.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-malloc-free-to-ownership/","playground":true,"bridgeFrom":"c","credits":["ownership/ownership","ownership/drop-order"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-memory","id":"c-pointers-to-references","title":"Pointers to References","concept":"Shared or exclusive, checked at compile time","summary":"A reference is a pointer the compiler checks: shared `&T` for reading, or one exclusive `&mut T` for writing, never both at once.","rule":"At any point a value has either any number of shared borrows `&T` or exactly one mutable borrow `&mut T`, never both; a borrow lends access without transferring ownership.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-pointers-to-references/","playground":true,"bridgeFrom":"c","credits":["basics/references-intro","ownership/borrowing"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-memory","id":"c-pointer-length-to-slices","title":"Pointer + Length to Slices","concept":"A view that carries its own bounds","summary":"A slice `&[T]` is a pointer and a length in one value, so functions receive their bounds and every index is checked.","rule":"A slice borrows a contiguous range of another value's elements; it allocates nothing, and indexing past its length panics instead of reading out of bounds.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-pointer-length-to-slices/","playground":true,"bridgeFrom":"c","credits":["ownership/slices"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-memory","id":"c-dangling-pointers-to-lifetimes","title":"Dangling Pointers and Lifetimes","concept":"The compiler checks what the comment promised","summary":"A lifetime names how long a reference is valid, so the compiler rejects the dangling pointer that a C comment could only warn about.","rule":"A lifetime annotation relates the output borrow to the input borrows; it never extends how long any value lives.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-dangling-pointers-to-lifetimes/","playground":true,"bridgeFrom":"c","credits":["ownership/lifetimes-intro"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-memory","id":"c-struct-copy-to-copy-clone","title":"Struct Copies: Copy and Clone","concept":"Bitwise copies only for plain data","summary":"Rust copies a struct implicitly only when it is plain data marked `Copy`; anything that owns a resource moves, and a deep copy is an explicit `.clone()`.","rule":"`Copy` permits implicit bitwise duplication for types that own no resources; `Clone` is an explicit duplication whose cost depends on the type.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-struct-copy-to-copy-clone/","playground":true,"bridgeFrom":"c","credits":["ownership/copy-clone"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-data","id":"c-structs-to-impl","title":"Structs and Methods","concept":"The receiver states the pointer contract","summary":"Methods live in an `impl` block, and the receiver (`&self`, `&mut self` or `self`) states what C expressed with `const` pointers and comments.","rule":"`&self` reads, `&mut self` modifies, and `self` consumes the value; read a method's receiver to learn its ownership effect.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-structs-to-impl/","playground":true,"bridgeFrom":"c","credits":["basics/structs","basics/methods-intro"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-data","id":"c-tagged-unions-to-enums","title":"Tagged Unions to Enums","concept":"A tag that cannot disagree with its payload","summary":"A Rust `enum` is a tagged union whose tag and payload cannot disagree, and `match` must handle every variant.","rule":"`match` must be exhaustive: every variant has to be handled, and an arm with a guard does not count as covering its pattern.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-tagged-unions-to-enums/","playground":true,"bridgeFrom":"c","credits":["basics/enums","basics/pattern-matching"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-data","id":"c-null-and-errno-to-option-result","title":"NULL and errno to Option and Result","concept":"Absence and failure in the return type","summary":"Absence is `Option<T>` and failure is `Result<T, E>`, both in the return type, so a caller cannot use the value without handling the other case.","rule":"Return `Option<T>` when a value may simply be absent and `Result<T, E>` when the caller needs to know why an operation failed.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-null-and-errno-to-option-result/","playground":true,"bridgeFrom":"c","credits":["basics/option-result","basics/recoverable-errors"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-data","id":"c-char-arrays-to-strings","title":"char Arrays to Strings","concept":"Owned UTF-8 with a length, not a NUL","summary":"A Rust `String` is an owned, growable UTF-8 buffer with a stored length and no NUL, and text is never indexed by a single integer position.","rule":"`len()` counts UTF-8 bytes and `chars()` yields Unicode scalar values; indexing a string by an integer is forbidden because a byte offset may fall inside a character.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-c-developers/c-char-arrays-to-strings/","playground":true,"bridgeFrom":"c","credits":["basics/strings","basics/chars-and-text"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-systems","id":"c-make-and-headers-to-cargo","title":"Headers and make to Cargo","concept":"Modules, pub and the crate as the build unit","summary":"Cargo replaces headers and Makefiles: the crate is the unit of compilation, modules are found from `mod` declarations, and items are private until marked `pub`.","rule":"Items are private to their module unless marked `pub`; `src/main.rs` is the default binary target and `src/lib.rs` the library target.","minutes":11,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-make-and-headers-to-cargo/","playground":true,"bridgeFrom":"c","credits":["projects/modules","projects/package-layout"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-systems","id":"c-unsafe-and-ffi","title":"unsafe, Raw Pointers and FFI","concept":"Where Rust hands the proof back to you","summary":"Raw pointers, `unsafe` and `extern \"C\"` let Rust do what C does, and `unsafe` marks exactly where you take over the proof that the compiler cannot do.","rule":"Creating a raw pointer is safe; dereferencing it needs `unsafe`, which is a claim that the pointer is valid, aligned, initialised and correctly aliased, not a switch that turns the checks off.","minutes":14,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-unsafe-and-ffi/","playground":true,"bridgeFrom":"c","credits":["systems/unsafe","systems/raw-pointers"],"appAvailability":"next-app-version"},{"courseId":"rust-for-c-developers","unitId":"c-systems","id":"c-pthreads-to-threads","title":"pthreads to std::thread","concept":"Locks that own data, threads that own their captures","summary":"Rust threads are the same OS threads as pthreads, but a `Mutex` owns the data it protects and the compiler rejects data races.","rule":"`thread::spawn` needs a `Send + 'static` closure, so captures are moved in; shared state goes in `Arc<Mutex<T>>`, and the lock guard unlocks when it drops.","minutes":13,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-c-developers/c-pthreads-to-threads/","playground":true,"bridgeFrom":"c","credits":["concurrency/concurrency","concurrency/shared-state"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-rust-at-a-glance","id":"node-what-rust-is","title":"Node.js runtime vs compiled Rust","concept":"Ahead-of-time compilation to a native executable","summary":"Rust is compiled ahead of time to a native executable: rustc checks types, ownership and borrowing before anything runs, and there is no garbage collector or built-in event loop.","rule":"Rust is a compiled, statically typed language without a garbage collector: rustc checks types, ownership and borrowing before the program runs, then produces a native executable.","minutes":9,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-what-rust-is/","playground":true,"bridgeFrom":"javascript","credits":["basics/what-is-rust"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-rust-at-a-glance","id":"node-no-garbage-collector","title":"Garbage collection vs deterministic drop","concept":"Deterministic drop at the end of scope","summary":"V8's garbage collector frees objects whenever it decides; Rust drops each value at the end of its owner's scope, in an order you can read from the code.","rule":"At scope end, remaining locals drop in reverse declaration order; struct fields drop in declaration order.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-no-garbage-collector/","playground":true,"bridgeFrom":"javascript","credits":["ownership/drop-order"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-rust-at-a-glance","id":"node-types-are-checked-not-erased","title":"TypeScript types vs Rust types","concept":"Types the compiler enforces, and its diagnostics","summary":"TypeScript types are erased and can be bypassed with `any` or `as`; Rust types are enforced by rustc, which builds nothing until its diagnostics are fixed.","rule":"rustc refuses to build a program with a type error: read each diagnostic's code, span and labels, and repair the first causal error before chasing its downstream messages.","minutes":11,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-types-are-checked-not-erased/","playground":true,"bridgeFrom":"typescript","credits":["basics/compiler-feedback"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-values","id":"node-console-log-to-println","title":"console.log vs println!","concept":"Compile-time checked formatting","summary":"`println!` replaces `console.log`, and rustc checks every placeholder against its arguments before the program runs.","rule":"Execution starts in `fn main()`; `println!` and `format!` are macros whose placeholders are checked during compilation.","minutes":9,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-console-log-to-println/","playground":true,"bridgeFrom":"javascript","credits":["basics/hello-rust","basics/print-formatting"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-values","id":"node-let-const-to-let-mut","title":"const and let vs let and let mut","concept":"Immutable bindings, mut and shadowing","summary":"Rust's plain `let` is stricter than `const`: without `mut` you can neither reassign the binding nor change the value through it.","rule":"`let` is immutable, `let mut` permits change, and a new `let` with the same name shadows the old binding.","minutes":8,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-let-const-to-let-mut/","playground":true,"bridgeFrom":"javascript","credits":["basics/variables"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-values","id":"node-number-to-integer-types","title":"Number vs Rust integer types","concept":"Explicit numeric types and overflow","summary":"Every JavaScript `Number` is an f64. Rust makes you pick a numeric type, convert between types explicitly and decide what happens on overflow.","rule":"Numeric types never mix implicitly: convert with `From` or `try_from`, and choose checked, wrapping or saturating arithmetic where overflow is possible.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-number-to-integer-types/","playground":true,"bridgeFrom":"javascript","credits":["basics/number-types","basics/operators"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-values","id":"node-functions-to-fn","title":"JavaScript functions vs fn","concept":"Typed parameters and tail expressions","summary":"A Rust function declares every parameter type and returns its final expression; there are no default parameters and no implicit coercions.","rule":"Every parameter has a type, arguments must match it exactly, and a block's final expression without a semicolon is its value.","minutes":10,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-functions-to-fn/","playground":true,"bridgeFrom":"javascript","credits":["basics/functions","basics/function-parameters","basics/block-expressions"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-values","id":"node-truthiness-to-bool-and-match","title":"Truthiness vs bool, if and match","concept":"No truthiness: conditions are bool","summary":"Rust has no truthy or falsy values: a condition must be a `bool`, and `if` and `match` are expressions whose branches share one type.","rule":"`if` requires a `bool`, and every branch of an `if` or `match` expression must produce the same type.","minutes":10,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-truthiness-to-bool-and-match/","playground":true,"bridgeFrom":"javascript","credits":["basics/booleans-comparisons","basics/control-flow"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-data","id":"node-objects-to-structs","title":"Classes and objects vs structs","concept":"Data in structs, behaviour in impl blocks","summary":"A class becomes a `struct` for the data and an `impl` block for the methods, and each method's receiver says whether it reads, changes or consumes the value.","rule":"`&self` reads, `&mut self` modifies and `self` consumes: the receiver tells the caller what a method does to the value.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-objects-to-structs/","playground":true,"bridgeFrom":"javascript","credits":["basics/structs","basics/methods-intro"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-data","id":"node-ts-unions-to-enums","title":"TypeScript unions vs enums","concept":"Discriminated unions as enums","summary":"A TypeScript discriminated union becomes a Rust `enum` whose variants carry their own data, and `match` must handle every variant.","rule":"An enum variant carries its own data, and `match` must cover every variant; a guard narrows an arm but never excuses a missing case.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-ts-unions-to-enums/","playground":true,"bridgeFrom":"typescript","credits":["basics/enums","basics/pattern-matching"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-data","id":"node-null-undefined-to-option","title":"null, undefined and ?? vs Option","concept":"Absence as Option<T>","summary":"`null` and `undefined` become `Option<T>`: absence is part of the type, and `?.` and `??` become `and_then`, `map` and `unwrap_or`.","rule":"Use `Option<T>` when a value may be absent and `Result<T, E>` when the caller needs the reason; `unwrap_or` replaces `??`, not `||`.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-null-undefined-to-option/","playground":true,"bridgeFrom":"typescript","credits":["basics/option-result"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-data","id":"node-array-methods-to-iterators","title":"Array methods vs iterators","concept":"Lazy iterator pipelines","summary":"`map` and `filter` on an array run at once and build new arrays; Rust's iterator adapters do nothing until a consumer such as `sum`, `find` or `collect` pulls values.","rule":"Iterator adapters are lazy: a consumer such as `sum`, `find`, `collect` or a `for` loop drives the work, one item at a time.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-array-methods-to-iterators/","playground":true,"bridgeFrom":"javascript","credits":["ownership/iterators","ownership/iterator-adapters"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-data","id":"node-map-and-objects-to-hashmap","title":"Objects and Map vs HashMap","concept":"Keyed data with HashMap and entry","summary":"Plain objects used as dictionaries become `HashMap<K, V>`: typed keys, no prototype keys, and `entry` for update-or-insert in one lookup.","rule":"`entry(key).or_insert(default)` looks the key up once and returns a mutable reference to the value, whether or not it was already there.","minutes":11,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-map-and-objects-to-hashmap/","playground":true,"bridgeFrom":"javascript","credits":["basics/collections"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-data","id":"node-utf16-strings-to-utf8","title":"UTF-16 strings vs UTF-8 String","concept":"UTF-8 bytes, chars and lengths","summary":"JavaScript strings count UTF-16 code units; a Rust `String` is UTF-8, `len()` counts bytes and `chars()` yields Unicode scalar values.","rule":"`len()` counts UTF-8 bytes and `chars().count()` counts Unicode scalar values; neither counts graphemes, and a `String` cannot be indexed by position.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-utf16-strings-to-utf8/","playground":true,"bridgeFrom":"javascript","credits":["basics/strings","basics/chars-and-text"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-ownership","id":"node-shared-references-to-ownership","title":"Shared references vs ownership","concept":"Moves instead of shared references","summary":"Assigning an object in JavaScript shares it; assigning a `String` or `Vec` in Rust moves it, and the old binding can no longer be used.","rule":"Each value has one owner: assignment or a by-value parameter moves it, `&T` lends it, and `clone()` makes an independent copy.","minutes":11,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-shared-references-to-ownership/","playground":true,"bridgeFrom":"javascript","credits":["ownership/ownership","ownership/move-functions"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-ownership","id":"node-mutation-to-borrowing","title":"Mutating arguments vs borrowing","concept":"Shared and mutable borrows","summary":"A function that changes its argument takes `&mut T`, and one that reads takes `&T`. Many shared borrows or one mutable borrow may exist, never both at once.","rule":"`&T` lends read-only access and `&mut T` lends exclusive write access; neither transfers ownership, and the two never overlap.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-mutation-to-borrowing/","playground":true,"bridgeFrom":"javascript","credits":["basics/references-intro","ownership/borrowing","ownership/mutable-borrows"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-ownership","id":"node-interfaces-to-traits","title":"TypeScript interfaces vs traits","concept":"Nominal traits instead of structural interfaces","summary":"A TypeScript interface is satisfied by any value with the right shape; a Rust trait is satisfied only by types that explicitly `impl` it.","rule":"A type implements a trait only through an explicit `impl`; use a generic bound for static dispatch over one type and `dyn Trait` for a collection of mixed types.","minutes":13,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-interfaces-to-traits/","playground":true,"bridgeFrom":"typescript","credits":["ownership/traits"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-runtime","id":"node-try-catch-to-result","title":"try/catch vs Result","concept":"Errors as Result values","summary":"`throw` and `try/catch` become `Result<T, E>`: failure is part of the return type, `?` propagates it, and panics are reserved for bugs.","rule":"Return `Result` for a failure the caller can act on, propagate it with `?`, and keep panics such as `unwrap` for bugs and broken invariants.","minutes":12,"exerciseKind":"runnable","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-try-catch-to-result/","playground":true,"bridgeFrom":"javascript","credits":["basics/recoverable-errors","projects/errors"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-runtime","id":"node-npm-to-cargo","title":"npm and package.json vs Cargo","concept":"package.json and npm mapped to Cargo","summary":"`package.json` becomes `Cargo.toml`, `package-lock.json` becomes `Cargo.lock`, and npm scripts become built-in Cargo commands, but a bare version number means something different.","rule":"In `Cargo.toml` a bare version such as `\"1.3.0\"` is a caret requirement, `>=1.3.0, <2.0.0`; pin exactly with `\"=1.3.0\"`, and let `Cargo.lock` record what was resolved.","minutes":10,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-npm-to-cargo/","playground":true,"bridgeFrom":"javascript","credits":["projects/dependencies"],"appAvailability":"next-app-version"},{"courseId":"rust-for-nodejs-developers","unitId":"node-runtime","id":"node-promises-to-futures","title":"Promises vs futures","concept":"Lazy futures and an explicit runtime","summary":"A Promise starts running when it is created; a Rust future does nothing until it is polled, usually by `.await` inside a runtime such as Tokio.","rule":"Futures are lazy: calling an `async fn` only creates a future, and no code inside it runs until something polls it.","minutes":12,"exerciseKind":"planned","url":"https://crabrix.com/learn/rust-for-nodejs-developers/node-promises-to-futures/","playground":true,"bridgeFrom":"javascript","credits":["concurrency/futures"],"appAvailability":"next-app-version"}],"paths":[{"id":"rust-from-zero","title":"Rust from Zero","audience":"People who are new to Rust, or new to programming in a compiled language","description":"Start with what Rust is, then values, functions, control flow and data modelling, then ownership, abstractions, a first Cargo project and threads.","stepCount":52},{"id":"rust-for-nodejs","title":"Rust for Node.js Developers","audience":"JavaScript, TypeScript and Node.js developers","description":"The Node.js bridge course first: it puts your habits next to Rust and covers 30+ Academy lessons. Then ownership in depth, traits, error design, a CLI and an HTTP API, and async Rust with backpressure and shutdown, the parts a backend developer needs next.","stepCount":47},{"id":"rust-for-c","title":"Rust for C Developers","audience":"Programmers who know C: pointers, malloc and free, make","description":"The C bridge course first: it maps malloc/free, pointers, errno and tagged unions onto Rust and covers 30+ Academy lessons. Then borrowing rules in depth, smart pointers, FFI and layout, unsafe contracts, and threads with atomics.","stepCount":45},{"id":"rust-for-experienced","title":"Rust for Experienced Programmers","audience":"Developers fluent in another language","description":"Skip the syntax tour: what Rust is, reading rustc, then ownership, borrowing, traits and generics, errors as values, modules and tests, and the concurrency model.","stepCount":28},{"id":"rust-backend","title":"Rust Backend Development","audience":"Developers building CLIs, HTTP services and data pipelines","description":"Errors with context, validated data, a CLI contract, HTTP routing and JSON, SQL with transactions, diagnostics and a repeatable release, then async task ownership and backpressure.","stepCount":27},{"id":"async-rust","title":"Async Rust","audience":"Developers who need futures, runtimes and cancellation","description":"Futures and runtimes, join and select, pinning, cancellation safety, blocking, task ownership, backpressure and graceful shutdown, with interview questions to check understanding.","stepCount":16},{"id":"systems-programming","title":"Systems Programming","audience":"Developers working close to memory, FFI and WebAssembly","description":"Macros, unsafe Rust and its invariants, FFI, layout, performance measurement and WebAssembly, with interior mutability and atomics.","stepCount":22},{"id":"rust-interview","title":"Rust Interview Preparation","audience":"Candidates preparing for Rust interviews","description":"All interview topics: language, async, systems, APIs and live coding.","stepCount":52}],"examples":[{"id":"ferris-pixel-art","title":"Ferris Pixel Art","detail":"Render a crab from strings and iterators","difficulty":"starter","category":"graphics","concepts":["arrays","iterators","stdout"]},{"id":"orbit-dashboard","title":"Orbit Dashboard","detail":"A terminal UI built from a local module","difficulty":"intermediate","category":"graphics","concepts":["modules","formatting","functions"]},{"id":"constellation-generator","title":"Constellation Generator","detail":"A seeded pixel sky with subtle star glow and a meteor trail","difficulty":"intermediate","category":"graphics","concepts":["algorithms","String","loops","structs","pixel art"]},{"id":"word-lab","title":"Word Lab","detail":"Build a sorted frequency chart with std","difficulty":"starter","category":"data","concepts":["BTreeMap","ownership","collections"]},{"id":"fizzbuzz-match","title":"FizzBuzz by Match","detail":"The classic, written the way Rust wants it","difficulty":"starter","category":"algorithms","concepts":["match","tuples","ranges"]},{"id":"temperature-table","title":"Temperature Table","detail":"Formatting, floats, and a tidy aligned table","difficulty":"starter","category":"data","concepts":["floats","formatting","iterators"]},{"id":"prime-sieve","title":"Prime Sieve","detail":"Sieve of Eratosthenes over a boolean Vec","difficulty":"starter","category":"algorithms","concepts":["Vec","loops","algorithms"]},{"id":"roman-numerals","title":"Roman Numerals","detail":"Two-way conversion with slices and folds","difficulty":"intermediate","category":"algorithms","concepts":["slices","String","fold"]},{"id":"run-length-encoder","title":"Run-Length Encoder","detail":"Compress and expand a string, round-trip checked","difficulty":"intermediate","category":"text","concepts":["chars","String","assert"]},{"id":"matrix-multiply","title":"Matrix Multiply","detail":"Nested Vec maths with a printed result grid","difficulty":"intermediate","category":"math","concepts":["Vec<Vec<T>>","indexing","math"]},{"id":"mandelbrot-ascii","title":"Mandelbrot in ASCII","detail":"Escape-time fractal drawn with characters","difficulty":"intermediate","category":"graphics","concepts":["floats","nested loops","math"]},{"id":"game-of-life","title":"Game of Life","detail":"Conway's automaton stepped and printed","difficulty":"intermediate","category":"simulation","concepts":["grids","wrapping","simulation"]},{"id":"binary-search-tree","title":"Binary Search Tree","detail":"Box, Option, and recursion building a real tree","difficulty":"advanced","category":"data","concepts":["Box","Option","recursion"]},{"id":"state-machine","title":"Traffic State Machine","detail":"Enums that make an invalid transition impossible","difficulty":"intermediate","category":"simulation","concepts":["enums","match","state"]},{"id":"csv-report","title":"CSV Report","detail":"Parse embedded rows into structs and summarise","difficulty":"intermediate","category":"data","concepts":["structs","parsing","Result"]},{"id":"tokenizer","title":"Expression Tokenizer","detail":"Turn arithmetic text into typed tokens","difficulty":"advanced","category":"text","concepts":["enums","chars","peekable"]},{"id":"generic-stack","title":"Generic Stack","detail":"One data structure, any type, with trait bounds","difficulty":"advanced","category":"systems","concepts":["generics","traits","Option"]},{"id":"iterator-pipeline","title":"Iterator Pipeline","detail":"One lazy chain from raw text to a ranked result","difficulty":"intermediate","category":"algorithms","concepts":["iterators","closures","sorting"]},{"id":"error-pipeline","title":"Error Pipeline","detail":"A custom error type propagated with ?","difficulty":"advanced","category":"systems","concepts":["Result","From","Display"]},{"id":"guessing-oracle","title":"Guessing Oracle","detail":"Deterministic binary search plays its own game","difficulty":"starter","category":"games","concepts":["Ordering","loops","binary search"]},{"id":"budget-planner","title":"Budget Planner","detail":"Model expenses and calculate category totals","difficulty":"starter","category":"data","concepts":["struct","iterators","f64"]},{"id":"todo-board","title":"Todo Board","detail":"Track work with structs and an explicit state enum","difficulty":"starter","category":"data","concepts":["enum","struct","filter"]},{"id":"caesar-cipher","title":"Caesar Cipher","detail":"Transform ASCII text one character at a time","difficulty":"starter","category":"text","concepts":["char","map","modulo"]},{"id":"palindrome-inspector","title":"Palindrome Inspector","detail":"Normalize Unicode text before comparing it","difficulty":"starter","category":"text","concepts":["chars","filter","reverse"]},{"id":"unit-converter","title":"Unit Converter","detail":"Keep formulas in small typed functions","difficulty":"starter","category":"math","concepts":["functions","f64","formatting"]},{"id":"ascii-histogram","title":"ASCII Histogram","detail":"Turn numeric data into a terminal chart","difficulty":"starter","category":"graphics","concepts":["arrays","repeat","formatting"]},{"id":"dice-lab","title":"Dice Lab","detail":"Simulate repeatable dice rolls with an LCG","difficulty":"starter","category":"games","concepts":["arrays","wrapping","simulation"]},{"id":"tic-tac-toe-referee","title":"Tic-Tac-Toe Referee","detail":"Evaluate a board with indexed winning lines","difficulty":"intermediate","category":"games","concepts":["arrays","Option","patterns"]},{"id":"log-analyzer","title":"Log Analyzer","detail":"Filter structured log lines and count levels","difficulty":"starter","category":"systems","concepts":["lines","split_once","match"]},{"id":"inventory-ledger","title":"Inventory Ledger","detail":"Apply typed stock transactions to a BTreeMap","difficulty":"intermediate","category":"data","concepts":["enum","BTreeMap","entry"]},{"id":"maze-bfs","title":"Maze Pathfinder","detail":"Find a shortest grid path with breadth-first search","difficulty":"intermediate","category":"algorithms","concepts":["VecDeque","grid","BFS"]},{"id":"markdown-outline","title":"Markdown Outline","detail":"Extract headings into an indented document map","difficulty":"starter","category":"text","concepts":["lines","trim","slices"]},{"id":"command-parser","title":"Command Parser","detail":"Turn terminal text into a typed command enum","difficulty":"intermediate","category":"systems","concepts":["enum","Result","splitn"]},{"id":"checksum-lab","title":"Checksum Lab","detail":"Compute a deterministic FNV-1a content fingerprint","difficulty":"starter","category":"systems","concepts":["bytes","wrapping","hash"]},{"id":"task-scheduler","title":"Task Scheduler","detail":"Order jobs and build a deterministic timeline","difficulty":"intermediate","category":"simulation","concepts":["sort_by_key","struct","timeline"]},{"id":"vending-state-machine","title":"Vending State Machine","detail":"Encode valid machine transitions with enums","difficulty":"intermediate","category":"simulation","concepts":["enum","match","state machine"]},{"id":"weather-station","title":"Weather Station","detail":"Summarize sensor samples without losing units","difficulty":"intermediate","category":"data","concepts":["newtype","fold","statistics"]},{"id":"rpn-calculator","title":"RPN Calculator","detail":"Evaluate typed tokens with a checked stack","difficulty":"advanced","category":"algorithms","concepts":["Result","stack","parsing"]},{"id":"event-bus","title":"Event Bus","detail":"Dispatch one event to different trait objects","difficulty":"advanced","category":"systems","concepts":["trait object","Vec<Box<_>>","dispatch"]},{"id":"word-chain-game","title":"Word Chain Game","detail":"Validate turn order and reject repeated words","difficulty":"intermediate","category":"games","concepts":["HashSet","windows","validation"]},{"id":"pixel-sunset","title":"Pixel Sunset","detail":"Generate a layered sky, sun, and sea reflection","difficulty":"starter","category":"graphics","concepts":["loops","coordinates","palette"]},{"id":"cellular-garden","title":"Cellular Garden","detail":"Evolve a tiny cellular automaton into a living pattern","difficulty":"intermediate","category":"graphics","concepts":["grids","neighbors","simulation"]},{"id":"mandelbrot-canvas","title":"Mandelbrot Canvas","detail":"Turn complex-number iteration into a fractal image","difficulty":"advanced","category":"graphics","concepts":["floats","iteration","fractals"]},{"id":"constellation-map","title":"Constellation Map","detail":"Plot stars and brightness on a midnight canvas","difficulty":"starter","category":"graphics","concepts":["tuples","distance","drawing"]},{"id":"terrain-map","title":"Terrain Map","detail":"Generate islands from deterministic coordinate noise","difficulty":"intermediate","category":"graphics","concepts":["hashing","thresholds","maps"]},{"id":"color-waves","title":"Color Waves","detail":"Combine sine waves into an animated-looking still","difficulty":"intermediate","category":"graphics","concepts":["trigonometry","sampling","color"]}],"teachingContract":{"version":"1.1.0","url":"https://crabrix.com/api/academy/v1/teaching-contract.md"},"learningState":{"schemaVersion":1,"schemaUrl":"https://crabrix.com/api/academy/v1/learning-state.schema.json"}}