Sometimes what helps me is to fully understand the problem then move on and start working on other things and try as hard as possible not to think of a solution.

At some point..... minutes, days or weeks later a solution will force itself into my mind that is inescapable.

Also this sometimes yields no solutions but I usually started out with a problem I couldn't solve so at worst I'm back where I began

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store