How to use the Coding Interview Pattern Finder
- 1. Describe the problemTick the statements that are true, such as "the input is sorted" or "it asks for the k-th item". Pasting the text helps too.
- 2. Find patternsSee the top three patterns with a match score and the reasons.
- 3. Use the templateEach pattern comes with short pseudo-code and well-known problems to practise.
The 15 patterns
The finder knows two pointers, sliding window, binary search (on indexes or on the answer), hash map or set, heap and top-k, breadth-first search, backtracking, dynamic programming, intervals and greedy, fast and slow pointers, monotonic stack, trie, union-find, prefix sums and tree DFS. Each statement you tick adds weight to the patterns it suggests; keywords in pasted text add a little more. It's a rule-based helper, not an AI or a solver.
Worked example
With the sample text "find the length of the longest substring without repeating characters" and the contiguous-substring box ticked, Sliding Window scores 7: 4 for the tick and 3 because the text mentions a longest substring without something. Dynamic programming and prefix sums score 1 each. The template shows a window that grows on the right and shrinks on the left while it breaks the rule, which is exactly how the problem is solved in O(n).
Paste "return the k most frequent elements" instead and the top match becomes Heap / Top K.
How to train pattern recognition
- After solving a problem, write down the clue in the statement that pointed to the pattern.
- Practise mixed sets once you know the patterns, because real interviews don't tell you the topic.
- Many problems combine two: a hash map inside a sliding window, or BFS on a grid with a visited set.
Frequently asked questions
Will it solve the problem for me?
No. It suggests techniques and a template; the solution is yours to write.
Is my pasted text sent anywhere?
No. Matching happens in your browser.
What if no pattern matches?
Tick more statements. If none fit, the problem may need simulation or plain implementation.
Is the pattern finder free?
Yes. Everything in the pattern finder works without signing up. The first time you ask for a result, we ask once for your name and WhatsApp number; after that the pattern finder and every other Uncodemy tool open straight away.