Interview in a few hours?

Brush up before you log in.

Fast recall cards, focused search, and just enough detail to refresh the right answers before the interview starts.

Clear

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

All revision cards

49 cards

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.

Coding Exercises Easy O(n)

First Non-Repeating Character

Build a frequency map for the characters, then iterate through the string a second time to return the first character whose count is one.

Return the first character in a string that appears exactly once, or an empty string if none exists.

Coding Exercises Medium O(n * k log k)

Group Anagrams

Use a dictionary keyed by the sorted characters of each word, then append each word into the matching bucket.

Group words that are anagrams of each other and return the grouped lists.

Coding Exercises Medium O(n)

House Robber

Track the best result when including or excluding the current house. A rolling two-variable DP solution keeps the implementation compact.

Return the maximum amount you can rob from houses without robbing adjacent houses.

Coding Exercises Easy O(n + m)

Intersection of Two Arrays

Convert both arrays to sets, intersect them, and sort the result if you want deterministic output for testing or interviews.

Return the unique values that appear in both arrays.