‹‹

Coding interview question patterns

Last updated: Nov 18, 2021
Problem Category Notes
Two Sum lists, dicts track num:nums[i] in dict, check if target - nums[i] exists
Best Time to Buy and Sell Stock lists, dp Kadane's Algorithm
Contains Duplicate lists, dicts, sorting list -> set and compare lengths / loop while adding to dict and check existence
CyclicRotation lists loop while insert(0, pop()) / use colections.deque.rotate
OddOccurrencesInArray lists use Counter + generator expression to get the key with an odd value
FrogJmp - math.ceil(distance / possible jumps)
PermMissingElem lists linear search with enumerate
TapeEquilibrium lists -