In uni there were a few times where I'd spend 12 hours solving assignment problems. At EOD I still had maybe half unsolved, although I'd tried to solve them all. Next morning in the 30 minutes I had before class, I quickly solve all the problems before handing it in.
Oh, another time for algorithms assignment, I am up until 5am or so. Still had 2/5 problems left unsolved (but again I had tried to solve them). I go for coffee at the student center, oops it's not 24/7. I take a light nap in the student center waiting for the coffee place to open up. Full on REM dream problem solving occurs. A couple hours later I awake knowing full well how to solve the 2 remaining problems. I grab my coffee and leave to write up the solutions.
Oh, another time for algorithms assignment, I am up until 5am or so. Still had 2/5 problems left unsolved (but again I had tried to solve them). I go for coffee at the student center, oops it's not 24/7. I take a light nap in the student center waiting for the coffee place to open up. Full on REM dream problem solving occurs. A couple hours later I awake knowing full well how to solve the 2 remaining problems. I grab my coffee and leave to write up the solutions.
Sleep really helps.