Hello everyone! Today I successfully solved three problems in LeetCode: single number, first missing positive number and next larger element III. There is a common mistake that every one of us, myself included, makes. For example, when we find such a simple problem, maybe we tend to skip it, or use some familiar algorithm to solve it as a matter of course, rather than looking further. However, use resources to determine whether the solution you find is the most effective; if not, take the time to learn a better solution.
Singular is a simple problem and I know a solution. However, I’m curious if there is a better solution. So when I found it, I was really surprised that this problem could be solved in such an effective way.
Likewise, it’s important to focus on building solid logic first when solving the first missing positive number and the next larger element III. Then break it down into smaller steps, which will simplify the process. Approaching problems in this way helps develop better solutions.
Hope my experience helps you.