Coding interview questions by topic
Most coding interview problems are a small number of patterns in different clothes. Learning to recognise the pattern from the wording is faster than memorising solutions, and it is what interviewers hope to see you do.
What are the most common coding interview topics?
The most common topics are arrays and hashing, two pointers, sliding window, stacks, binary search, linked lists, trees, graphs, heaps, dynamic programming, backtracking and tries. Each has a recognisable pattern; learn the signals that suggest it and a template for solving it.
How to use these pages
Each topic page lists the signals that suggest the pattern, a way to build the solution, named classic problems to practise and the mistakes interviewers see most. Read one, then take a practice interview on that topic, and say the pattern out loud before you code.
Practising by topic
Topic-based interviews on giveinterview give you several questions from the topics you choose, including problems you have not seen, which is closer to a full coding round than a single question. Your first 3 single-question interviews are free for life, every interview report is free, and a new account also gets 6 welcome credits.
In this section
- Arrays and hashing interview questions
- Two pointers interview questions
- Sliding window interview questions
- Stack interview questions
- Binary search interview questions
- Linked list interview questions
- Trees interview questions
- Graphs interview questions
- Heap and priority queue interview questions
- Dynamic programming interview questions
- Backtracking interview questions
- Tries interview questions
Frequently asked questions
Which topic should I learn first?
Start with arrays and hashing, two pointers and sliding window. They are the most common in early rounds and they teach the habit of trading memory for time.
How many problems do I need to solve?
Quality beats count. Solving a problem, then explaining why the pattern fits and what you would change if a constraint moved, teaches more than rushing through many.
Keep reading
- Practice interview online, with an interviewer that answers back
- AI mock interview with voice, live coding and a scorecard
- AI interview: what it is and how to prepare for one
- Coding interview practice that includes the interview
- Choosing an interview practice tool
- Company interview guidesRounds and questions by company