Quick recall mode

Keywords first, details second.

Use this mode when you want memory triggers only: title, summary, tags, and bullet anchors without long answers getting in the way.

Clear

Results update as you type. Press / to jump straight into search.

Quick recall

374 cards

Coding Exercises Medium O(n^2)

3 Sum

Sort the array, fix one value at a time, and use two pointers on the remaining range. Skip duplicate anchors and duplicate pointer values so the result contains unique triplets only.

Return all unique triplets in an array whose sum is zero.

Coding Exercises Easy O(n)

Anagram Check

Either sort both strings and compare them, or build character frequency maps. The hash-map version is linear time and communicates counting skill well.

Check whether two strings contain the same characters with the same counts.

Coding Exercises Easy O(log n)

Binary Search

Use left and right pointers, compute the middle index, and discard half the range each step based on the comparison.

Given a sorted list and a target, return the target index or -1 if it is missing.

Coding Exercises Medium O(n)

Binary Tree Traversals

Write a DFS helper that appends the current node before, between, or after visiting children depending on which traversal you are building.

Return the inorder, preorder, and postorder traversals of a binary tree.

Coding Exercises Easy O(n)

Climbing Stairs

Each position depends on the previous two positions, so keep only the last two counts and build forward iteratively.

Return how many distinct ways there are to reach the top if you can climb 1 or 2 steps at a time.

Coding Exercises Medium O(amount * len(coins))

Coin Change

Initialize a DP array with an impossible sentinel value, set dp[0] to zero, and for each amount try every coin to update the cheapest reachable solution.

Given coin denominations and a target amount, return the minimum number of coins needed to make that amount or -1 if it is impossible.

Coding Exercises Easy O(n)

Count Word Frequency

Split the text into words, normalize if needed, and increment counts in a dictionary. Python collections.Counter is great, but interviewers may ask for the manual version first.

Return a frequency map for the words in a sentence.