Not exactly sure if it belongs in this site, but I always have trouble thinking of all the certain edge cases in any kind of competitive programming or puzzles.
For example, take this kind of problem
Find the size of the smallest list of squares that add up to n
f(16)-> 1 (16)
f(17)-> 2 (16+1)
One intuitive approach would be to take the largest square that fits into n, subtract, and taking the remainder and applying the function on that until n<4. This doesn't work as soon as you go to
f(18)-> 2 (9+9) rather than f(18)-> 3 (16+1+1)
While those edge cases may be easier to derive, many times edge cases will not be as intuitive. What are some general guidelines of finding such edge cases?