I have a few questions:
- When you saw this question, did you already know how to approach it?
- Did you look something up the internet which helped you solve it, if yes then how did you know what to search?
- If you knew how to solve it using common competitive programming Algorithms/Data Structure, then what did you use?