Coding Interview Patterns

This class was created by Brainscape user John Smith. Visit their profile to learn more about the creator.

Decks in this class (28)

Array Strategies
Binary search,
Find maximum in sliding window,
Search rotated array
12  cards
Dynamic Programming Strategies
Largest sum subarray,
Maxsum subsequence nonadjacent el...,
Game scoring find the number of w...
39  cards
Linked List Strategies
Reverse a singly linked list,
Remove duplicates from a linked list,
Delete node with a given key
14  cards
Math & Stats Strategies
Find kth permutation,
Integer division,
Pythagorean triplets
15  cards
String Strategies
Reverse words in a sentence,
Remove duplicates,
Remove white spaces
7  cards
Tree Strategies
Check if two binary trees are ide...,
Write an in order iterator for a ...,
Iterative inorder traversal
16  cards
Stack & Queue Strategies
Stack using queues,
Queue using stacks,
Expression evaluation
4  cards
Graph Strategies
Clone a directed graph,
Minimum spanning tree,
Word chaining
3  cards
Back-tracking strategies
Boggle,
All possible braces,
Solve n queens problem
4  cards
Sliding Window Strategies
Maximum sum subarray of size k,
Smallest subarray with a given sum,
Longest substring with k distinct...
11  cards
Two-pointer strategies
Pair with target sum,
Remove duplicates,
Squaring a sorted array
12  cards
Fast & Slow Pointer Strategies
Linkedlist cycle,
Start of linkedlist cycle,
Happy number
7  cards
Merge Intervals Problems
Merge intervals,
Insert interval,
Intervals intersection
7  cards
Cyclic Sort Problems
Cyclic sort,
Find the missing number,
Find all missing numbers
8  cards
InPlace Reversal of LinkedList
Reverse a linkedlist,
Reverse a sub list,
Reverse every k element sub list
5  cards
Tree Breadth First Search Strategies
Binary tree level order traversal,
Reverse level order traversal,
Zigzag traversal
10  cards
Tree Depth First Search Strategies
Binary tree path sum,
All paths for a sum,
Sum of path numbers
7  cards
Two-Heap Problems
Find the median of a number stream,
Sliding window median,
Maximize capital
5  cards
Subset Problems
Subsets,
Subsets with duplicates,
Permutations
9  cards
Modified Binary Search Problems
Order agnostic binary search,
Ceiling of a number,
Next letter
10  cards
Top K elements problems
Top k numbers,
Kth smallest number,
K closest points to the origin
14  cards
K-way Merge Problems
Merge k sorted lists,
Kth smallest number in m sorted l...,
Kth smallest number in a sorted m...
5  cards
Topological Sort (Graph) Strategies
Topological Sort is used to find a linear ordering of elements that have dependencies on each other. For example, if event ‘B’ is dependent on event ‘A’, ‘A’ comes before ‘B’ in topological ordering. This pattern defines an easy way to understand the technique for performing topological sorting of a set of elements and then solves a few problems using it.
7  cards
Matrix Strategies
Make columns and rows zeros,
Search in a matrix,
Closest meeting point
6  cards
ML Basics
Create a neuron from scratch
1  cards
Trie (Digital/Prefix tree) Strategies
Implement trie prefix tree,
Add and search word data structur...,
Word search ii
17  cards
Facebook Sample Questions
This is a sample of questions based on real-life ones from Facebook. This is not intended to be comprehensive (after all, the company intentionally switches up their questions to avoid memorization), but it should give you a good sense for the kind of concepts that are important to keep in mind.
11  cards
Google Sample Questions
Ratio finder
1  cards

More about
Coding Interview Patterns

  • Class purpose General learning

Learn faster with Brainscape on your web, iPhone, or Android device. Study John Smith's Coding Interview Patterns flashcards now!

How studying works.

Brainscape's adaptive web mobile flashcards system will drill you on your weaknesses, using a pattern guaranteed to help you learn more in less time.

Add your own flashcards.

Either request "Edit" access from the author, or make a copy of the class to edit as your own. And you can always create a totally new class of your own too!

What's Brainscape anyway?

Brainscape is a digital flashcards platform where you can find, create, share, and study any subject on the planet.

We use an adaptive study algorithm that is proven to help you learn faster and remember longer....

Looking for something else?

Coding Interviews (Python)
  • 29 decks
  • 268 flashcards
  • 464 learners
Decks: Array Strategies, Dynamic Programming Strategies, Linked List Strategies, And more!
CPT Coding
  • 41 decks
  • 740 flashcards
  • 179 learners
Decks: Ch 1 Text Questions, Ch 1 Chapter Review, Ch 1 Content Review, And more!
Make Flashcards