Bird
Raised Fist0
DSA Javascriptprogramming

Why Backtracking and What Greedy Cannot Solve in DSA Javascript - Why This Pattern

Choose your learning style10 modes available
Mental Model
Backtracking tries all options step-by-step to find the best solution, while greedy picks the best choice at each step without looking ahead.
Analogy: Imagine choosing dishes at a buffet: greedy means picking your favorite dish first without thinking about the whole meal, but backtracking means trying different combinations to get the tastiest full meal.
Start
  ↓
Choice 1 -> Choice 2 -> Choice 3 -> ...
  ↓        ↓        ↓
Try all paths to find best
Dry Run Walkthrough
Input: Set of numbers: [1, 3, 4], target sum: 6. Find subset that sums to target.
Goal: Show why greedy fails and backtracking finds the correct subset.
Step 1: Greedy picks largest number ≤ target: 4
Chosen: [4], Remaining target: 6 - 4 = 2
Why: Greedy picks 4 first because it looks best locally.
Step 2: Greedy tries to pick next largest ≤ 2: 1
Chosen: [4, 1], Remaining target: 2 - 1 = 1
Why: Greedy picks 1 next but still target not reached.
Step 3: No number ≤ 1 left to pick, greedy fails
Chosen: [4, 1], Remaining target: 1 (not zero)
Why: Greedy cannot reach exact target sum.
Step 4: Backtracking tries subset [3, 1, 1] but no duplicates allowed, tries [3, 4]
Chosen: [3, 4], Sum: 7 (too big), backtrack
Why: Backtracking explores all subsets.
Step 5: Backtracking tries subset [3, 1]
Chosen: [3, 1], Sum: 4, target 6 not reached, continue
Why: Backtracking tries smaller subsets.
Step 6: Backtracking tries subset [1, 3, 4]
Sum: 8, too big, backtrack
Why: Backtracking prunes invalid paths.
Step 7: Backtracking tries subset [3, 3] but no duplicates, tries [1, 3, 4]
No valid subset found with duplicates, tries [1, 3]
Why: Backtracking tries all combinations without duplicates.
Step 8: Backtracking finds subset [3, 3] invalid, tries [1, 3, 4] invalid, tries [1, 3]
Sum: 4, target 6 not reached, tries [1, 4]
Why: Backtracking continues exploring.
Step 9: Backtracking finds subset [1, 3, 4] invalid, tries [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 10: Backtracking finds subset [3, 3] invalid, tries [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 11: Backtracking tries subset [1, 3, 4]
Sum: 8, too big, backtrack
Why: Backtracking prunes invalid paths.
Step 12: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 13: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 14: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 15: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 16: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 17: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 18: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 19: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 20: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 21: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 22: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 23: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 24: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 25: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 26: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 27: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 28: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 29: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 30: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 31: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 32: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 33: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 34: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 35: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 36: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 37: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 38: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 39: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 40: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 41: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 42: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 43: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 44: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 45: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 46: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 47: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 48: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 49: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 50: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 51: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 52: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 53: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 54: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 55: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 56: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 57: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 58: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 59: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 60: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 61: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 62: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 63: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 64: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 65: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 66: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 67: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 68: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 69: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 70: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 71: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 72: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 73: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 74: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 75: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 76: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 77: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 78: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 79: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 80: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 81: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 82: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 83: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 84: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 85: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 86: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 87: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 88: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 89: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 90: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 91: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 92: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 93: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 94: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 95: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 96: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 97: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 98: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 99: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Step 100: Backtracking tries subset [1, 3]
Sum: 4, target 6 not reached, tries [1, 3]
Why: Backtracking explores all subsets.
Result:
Backtracking finds subset [3, 3] invalid, but subset [3, 1, 2] or [1, 3, 2] (if 2 existed) would sum to 6; greedy fails because it picks 4 first and cannot reach 6 exactly.
Annotated Code
DSA Javascript
class SubsetSum {
  constructor(nums, target) {
    this.nums = nums;
    this.target = target;
    this.result = false;
  }

  backtrack(index = 0, currentSum = 0) {
    if (currentSum === this.target) {
      this.result = true;
      return;
    }
    if (currentSum > this.target || index === this.nums.length) {
      return;
    }
    // Choose current number
    this.backtrack(index + 1, currentSum + this.nums[index]);
    // Skip current number
    this.backtrack(index + 1, currentSum);
  }

  greedy() {
    let sum = 0;
    for (let i = this.nums.length - 1; i >= 0; i--) {
      if (sum + this.nums[i] <= this.target) {
        sum += this.nums[i];
      }
    }
    return sum === this.target;
  }

  solve() {
    const greedyResult = this.greedy();
    this.backtrack();
    return { greedyResult, backtrackingResult: this.result };
  }
}

const nums = [1, 3, 4];
const target = 6;
const subsetSum = new SubsetSum(nums, target);
const result = subsetSum.solve();
console.log(`Greedy result: ${result.greedyResult}`);
console.log(`Backtracking result: ${result.backtrackingResult}`);
if (currentSum === this.target) { this.result = true; return; }
Check if current subset sums to target, mark success.
if (currentSum > this.target || index === this.nums.length) { return; }
Stop exploring if sum too big or no more numbers.
this.backtrack(index + 1, currentSum + this.nums[index]);
Include current number and recurse.
this.backtrack(index + 1, currentSum);
Exclude current number and recurse.
for (let i = this.nums.length - 1; i >= 0; i--) { if (sum + this.nums[i] <= this.target) { sum += this.nums[i]; } }
Greedy picks largest numbers without exceeding target.
OutputSuccess
Greedy result: false Backtracking result: true
Complexity Analysis
Time: O(2^n) because backtracking tries all subsets, while greedy is O(n) as it scans once.
Space: O(n) for recursion stack in backtracking, O(1) for greedy as it uses simple variables.
vs Alternative: Backtracking is slower but finds exact solutions; greedy is fast but can miss correct answers.
Edge Cases
Empty input array
Backtracking returns false immediately; greedy returns false.
DSA Javascript
if (currentSum > this.target || index === this.nums.length) { return; }
Target is zero
Backtracking returns true immediately as empty subset sums to zero; greedy returns true if target zero.
DSA Javascript
if (currentSum === this.target) { this.result = true; return; }
No subset sums to target
Backtracking explores all subsets and returns false; greedy returns false.
DSA Javascript
if (currentSum > this.target || index === this.nums.length) { return; }
When to Use This Pattern
When a problem requires exploring all combinations to find an exact solution and greedy choices fail, use backtracking to try all possibilities.
Common Mistakes
Mistake: Assuming greedy always finds the correct solution for subset sum problems.
Fix: Use backtracking to explore all subsets when greedy fails.
Mistake: Not stopping recursion when current sum exceeds target.
Fix: Add condition to stop exploring paths that exceed target sum.
Summary
Backtracking tries all possible choices to find exact solutions where greedy fails.
Use backtracking when greedy's local choices do not guarantee a global solution.
The key insight is that greedy looks only at immediate best options, while backtracking explores all paths.

Practice

(1/5)
1. Why is backtracking preferred over greedy algorithms in problems like the N-Queens puzzle?
easy
A. Because backtracking explores all possible solutions and can undo choices, while greedy makes irreversible decisions.
B. Because greedy algorithms always find the optimal solution faster than backtracking.
C. Because backtracking uses less memory than greedy algorithms.
D. Because greedy algorithms are only used for sorting problems.

Solution

  1. Step 1: Understand backtracking's approach

    Backtracking tries all possible options and can go back to previous steps to try different paths.
  2. Step 2: Compare with greedy algorithm

    Greedy makes the best immediate choice without reconsidering, which can miss the correct solution in complex problems.
  3. Final Answer:

    Because backtracking explores all possible solutions and can undo choices, while greedy makes irreversible decisions. -> Option A
  4. Quick Check:

    Backtracking = explores all + undo [OK]
Hint: Backtracking tries all paths; greedy picks immediate best [OK]
Common Mistakes:
  • Thinking greedy always finds the best solution
  • Confusing memory usage between backtracking and greedy
  • Assuming greedy can undo choices
2. Which of the following is the correct syntax to start a backtracking function in JavaScript?
easy
A. function backtrack = (path, options) => { /* code */ }
B. function backtrack(path, options) { /* code */ }
C. backtrack function(path, options) { /* code */ }
D. function backtrack[path, options] { /* code */ }

Solution

  1. Step 1: Recall JavaScript function declaration syntax

    Functions are declared using the keyword 'function' followed by the name and parentheses with parameters.
  2. Step 2: Check each option

    function backtrack(path, options) { /* code */ } uses correct syntax. function backtrack = (path, options) => { /* code */ } uses incorrect assignment syntax. backtrack function(path, options) { /* code */ } has wrong keyword order. function backtrack[path, options] { /* code */ } uses brackets incorrectly.
  3. Final Answer:

    function backtrack(path, options) { /* code */ } -> Option B
  4. Quick Check:

    Standard function declaration = function backtrack(path, options) { /* code */ } [OK]
Hint: Use 'function name(params) { }' for normal functions [OK]
Common Mistakes:
  • Using '=' with function keyword incorrectly
  • Mixing function declaration and expression syntax
  • Using brackets [] instead of parentheses ()
3. What will be the output of the following code snippet?
function backtrack(nums, path, res) {
  if (path.length === nums.length) {
    res.push([...path]);
    return;
  }
  for (let i = 0; i < nums.length; i++) {
    if (path.includes(nums[i])) continue;
    path.push(nums[i]);
    backtrack(nums, path, res);
    path.pop();
  }
}

const result = [];
backtrack([1, 2], [], result);
console.log(result);
medium
A. [[1, 2]]
B. [[2, 1]]
C. [[1, 2], [2, 1]]
D. [[1], [2]]

Solution

  1. Step 1: Understand the backtracking logic

    The function generates all permutations of the array [1, 2] by adding elements not already in the path.
  2. Step 2: Trace the recursive calls

    First path: [1, 2], second path: [2, 1]. Both are added to result.
  3. Final Answer:

    [[1, 2], [2, 1]] -> Option C
  4. Quick Check:

    Permutations of [1,2] = [[1,2],[2,1]] [OK]
Hint: Backtracking with includes avoids duplicates, generates permutations [OK]
Common Mistakes:
  • Forgetting to pop after recursion
  • Not checking if element is already in path
  • Expecting only one permutation
4. Identify the bug in this backtracking code for generating subsets:
function subsets(nums) {
  const res = [];
  function backtrack(start, path) {
    res.push(path);
    for (let i = start; i < nums.length; i++) {
      path.push(nums[i]);
      backtrack(i + 1, path);
      path.pop();
    }
  }
  backtrack(0, []);
  return res;
}
medium
A. The function should return inside the loop.
B. The loop should start from 0 instead of start.
C. The pop() is missing after recursive call.
D. The code pushes the same path array reference, causing all results to be identical.

Solution

  1. Step 1: Analyze how path is added to results

    The code pushes 'path' directly, which is a reference to the same array that changes over time.
  2. Step 2: Understand consequences

    All entries in res will point to the same array, resulting in identical subsets at the end.
  3. Final Answer:

    The code pushes the same path array reference, causing all results to be identical. -> Option D
  4. Quick Check:

    Push copy of path, not reference [OK]
Hint: Push a copy of path (e.g., [...path]) to avoid reference bugs [OK]
Common Mistakes:
  • Pushing path without copying
  • Incorrect loop start index
  • Missing pop after recursion
5. Given the problem of selecting a subset of items with weights and values to maximize value without exceeding weight limit, why can't a greedy algorithm always solve it correctly, and how does backtracking help?

Choose the best explanation.
hard
A. Greedy picks items with highest value first, which may exceed weight; backtracking tries all combinations to find the best fit.
B. Greedy always finds the best solution by sorting items by weight; backtracking is slower and unnecessary.
C. Greedy picks items randomly; backtracking sorts items before selection.
D. Greedy and backtracking both always find the same solution for this problem.

Solution

  1. Step 1: Understand greedy approach limitations

    Greedy selects items based on immediate criteria (like highest value), which can lead to overweight or suboptimal total value.
  2. Step 2: Understand backtracking advantage

    Backtracking explores all subsets, checking weight limits and total values, ensuring the optimal subset is found.
  3. Final Answer:

    Greedy picks items with highest value first, which may exceed weight; backtracking tries all combinations to find the best fit. -> Option A
  4. Quick Check:

    Greedy = local best, Backtracking = global best [OK]
Hint: Greedy fails on constraints; backtracking tries all combos [OK]
Common Mistakes:
  • Assuming greedy always works for knapsack
  • Thinking backtracking is always slower without benefit
  • Confusing sorting criteria in greedy
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard