Coding interview prep

200 algorithms to pass any tech interview

You know the feeling: the whiteboard goes blank, the clock is ticking, and one tricky question decides everything. DEVSMAFIA gives you a structured path through the patterns that actually show up in interviews, so you walk in prepared, not panicking.

See all 200 problems
two-number-sum.js
function twoNumberSum(array, targetSum) {  const seen = new Set();  for (const num of array) {    const complement = targetSum - num;    if (seen.has(complement)) return [complement, num];    seen.add(num);  }  return [];}
Time O(n), space O(n)
Test ResultsAll tests passed!
  • Test Case 1[3, 5, -4, 8, 11, 1, -1, 6], 10 [-1, 11]Passed
  • Test Case 2[4, 6], 10 [4, 6]Passed
  • Test Case 3[4, 6, 1], 5 [4, 1]Passed
  • 200 problems
  • 11 algorithm categories
  • EN + PT-BR
  • Lifetime access

Built for the interview that changes your career

Big tech interviews are not about memorizing trivia. They test whether you can break a problem down, choose the right approach, and communicate clearly while you code.

We curated 200 original problems across Easy, Medium, Hard, and Very Hard, mirroring the depth you need for companies like Google, Meta, Amazon, and strong startups. Each one includes sample cases, hidden tests, progressive hints, and a full optimal solution with complexity analysis.

Practice in a real IDE in your browser: JavaScript or Python. Run against tests instantly. Reveal hints when you are stuck. Study the solution when you are ready to learn, not when you are guessing.

The full curriculum

Every problem is categorized by topic and difficulty so you always know what to practice next.

Arrays

Strings

Recursion

Searching

Sorting

Greedy Algorithms

Binary Search Trees

Binary Trees

Graphs

Linked Lists

Dynamic Programming

EasyMediumHardVery Hard200 problems

Easy

31 problems. Unlock to practice.

  1. 001Two Number SumArrays
  2. 002Validate SubsequenceArrays
  3. 003Sorted Squared ArrayArrays
  4. 004Tournament WinnerArrays
  5. 005Non-Constructible ChangeArrays
  6. 006Palindrome CheckStrings
  7. 007Caesar Cipher EncryptorStrings
  8. 008First Non-Repeating CharacterStrings

Medium

73 problems. Unlock to practice.

  1. 032Three Number SumArrays
  2. 033Smallest DifferenceArrays
  3. 034Move Element To EndArrays
  4. 035Array Of ProductsArrays
  5. 036First Duplicate ValueArrays
  6. 037Merge Overlapping IntervalsArrays
  7. 038Spiral TraverseArrays
  8. 039Longest PeakArrays

Hard

58 problems. Unlock to practice.

  1. 105Levenshtein DistanceDynamic Programming
  2. 106Max Sum Increasing SubsequenceDynamic Programming
  3. 107Longest Common SubsequenceDynamic Programming
  4. 108Binary Tree DiameterBinary Trees
  5. 109Knapsack ProblemDynamic Programming
  6. 110Four Number SumArrays
  7. 111Min RewardsArrays
  8. 112Water AreaArrays

Very Hard

38 problems. Unlock to practice.

  1. 163Largest Rectangle Under SkylineArrays
  2. 164Shorten PathStrings
  3. 165Count InversionsArrays
  4. 166Number of Binary Tree TopologiesDynamic Programming
  5. 167Non-Attacking QueensRecursion
  6. 168Knight ConnectionGraphs
  7. 169Square of ZeroesArrays
  8. 170Airport ConnectionsGraphs

Everything you need to get interview-ready

  • In-browser IDE

    Write JavaScript or Python, run sample tests, and submit against hidden cases without leaving the page.

  • Hints that teach

    Reveal guidance step by step when you are stuck, so you learn the pattern instead of copying an answer.

  • Full explanations

    See the optimal approach, time and space complexity, and a clear walkthrough after you try.

  • English and Portuguese

    Every prompt, hint, and explanation is available in natural Brazilian Portuguese and English.

  • Track your progress

    Mark problems as solved, pick up where you left off, and build momentum over time.

How it works

  1. 01

    Choose a problem

    Filter by category, difficulty, or status and start with what matches your level.

  2. 02

    Code and test

    Pick JavaScript or Python, use Run for visible tests, and Submit when you are ready for the full evaluation.

  3. 03

    Learn and repeat

    Use hints and solutions to solidify patterns, then move to the next challenge.

One payment. Full access.

Own the library forever

No subscription. Pay once and keep practicing for as long as you need.

  • All 200 algorithm problems
  • Hints and optimal solutions
  • In-browser editor and test runner (JavaScript & Python)
  • Bilingual EN / PT-BR content
  • Progress saved to your account
Special offer-50%

Promotional price. Limited time.

Was $79

$39One-time payment

Lifetime access

You save $40

Less than a single algo coaching session. Yours forever.

Secure Stripe checkout. Instant access, no subscription.

Questions

Is this a subscription?

No. You pay once and get lifetime access to the full library.

Which language do I code in?

The workspace supports JavaScript and Python across all 200 problems. Switch languages anytime. Your code is saved separately for each. Every problem includes reference solutions in both languages.

Are the problems copied from other platforms?

No. They are original problems written for DEVSMAFIA, organized to cover the same topics and difficulty mix you need for real interviews.

When do I get access?

Immediately after checkout. You will be redirected to the practice catalog.

Can I use this if I am not in Brazil?

Yes. English speakers pay in USD. Brazilian users see pricing in BRL.

Own the library forever

No subscription. Pay once and keep practicing for as long as you need.

Special offer-50%

$79$39

One-time payment, lifetime access

You save $40

200 Algorithms to Pass Any Tech Interview | DEVSMAFIA