- Size of the input? Range of values? Recursion stack issues.
- Is the input valid?
- How should the algorithm behave for corner cases?
- Can I mutate the input? Generally a bad practice, but may be okay for the interview.
- Is it ok to sort/manipulate the input data? Or do I need to preserve them? (similar with above)
- Do I have negative numbers, floating points, duplicates, empty inputs?
- What are some extreme cases of the input?
- How is the input stored? If you are given a bunch values, is it an array or a generator? If you are given a dictionary of words, is it a list of strings or a trie?
Links to this note
Framework for coding interviews
Having a framework by which you approach every single technical interview greatly improves your chances of success. It can’t help you have a perfect session, but almost guarantees you will...