These are getting complex, is there an easy way to solve them?
It may not necessarily be an easy way, but some exercises that have always helped me and many others are described below, and work for any issue you come across on your programming journeys!
- The rubber ducky method! You literally talk out loud to a rubber ducky, or anything else, or nothing at all like a crazy coder, and this act of talking out loud lets you hear your mistakes! It often helps to hear them verbally instead of in your head.
- Good ol’ pen and paper! You’d be surprised how often a problem you’re having can be solved if you write it out step by step. Keeping each step of a problem correctly in your head is a difficult task, and becomes nearly impossible as you progress and do more difficult work.
- With either method, always break down the problem into its simplest parts.