Working on one problem opposed to working on mutliple problems when programming
Interesting queston I am a psychology student who is learning how to code as well. I am often thinking about what are the best strategies to learn. Below I am referencing a research paper that showed that a too rigid mindset impairs performance in general problem solving abilities.

ErEl, H., &amp; Meiran, N. (2017). A drop in performance on a fluid intelligence test due to instructed-rule mindset. Psychological Research, 81(5), 901–909. https://doi.org/10.1007/s00426-016-0796-8

I am found something similar in my attempts to learn. Sometimes it is useful to take a break to relax your mindset, as it seems that the mind inhibits other solutions, when you are focused on something to exclusively.