2. Max Product of K Integers. Not exactly on Leetcode, but this one I really like. https://leetcode.com/problems/maximum-product-of-three-numbe.... It's essentially finding the maximum product obtained by selecting k numbers from a list of N integers (1 <= k <= N). This problem can be solved with a greedy algorithm, two pointer with sorting, using heap, and dynamic programming.
3. Word Ladder (https://leetcode.com/problems/word-ladder/) I think it would be wrong not to include a string problem. I think there are a lot of different ways to solve this one. You could use a trie or treat the strings as a graph. There are also a lot of optimizations you can make depending on the length of words vs number of words.
Honorable Mention. LRU Cache (https://leetcode.com/problems/lru-cache/). This may be the most common interview question asked at one point. Being able to execute a doubly ended linked list, leverage a dictionary, and implementing them all in a class with object oriented principles.
These don't cover everything, but give pretty good coverage of all the topics.
Re:I'm a ex-Google SWE that's coached 300 through the FAANG ...
by LecroJS on Sunday June 19, 2022 @07:44PM
(#31804650)
Thanks for taking the time for this! 1, 3, and the honorable mention are among my all time favorites. I haven’t seen either variation of 2 before — Going to do it right now
1. Unique Paths 2. https://leetcode.com/problems/unique-paths-ii/. This problem can be solved with dynamic programming, graph traversal, and recursion.
2. Max Product of K Integers. Not exactly on Leetcode, but this one I really like. https://leetcode.com/problems/maximum-product-of-three-numbe.... It's essentially finding the maximum product obtained by selecting k numbers from a list of N integers (1 <= k <= N). This problem can be solved with a greedy algorithm, two pointer with sorting, using heap, and dynamic programming.
3. Word Ladder (https://leetcode.com/problems/word-ladder/) I think it would be wrong not to include a string problem. I think there are a lot of different ways to solve this one. You could use a trie or treat the strings as a graph. There are also a lot of optimizations you can make depending on the length of words vs number of words.
Honorable Mention. LRU Cache (https://leetcode.com/problems/lru-cache/). This may be the most common interview question asked at one point. Being able to execute a doubly ended linked list, leverage a dictionary, and implementing them all in a class with object oriented principles.
These don't cover everything, but give pretty good coverage of all the topics.
Hopefully that answers your question!