What is your problem-solving process or mindset when approaching and solving a problem?
First, it’s obviously important to read the problem and understand it thoroughly. Afterward, read the constraints of the problem and see what complexity your algorithm should be (usually O(n)). Afterward, try to figure out what type of problem it is (greedy, DP, graph, etc). Once you figure out what the likely strategy of the problem is, I guess make sure that strategy works, and if it does, then implement.