We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Pretty much just comes with practice. As you program more you'll realize you can do more things without resorting to dealing with it case by case.
Also, the simple python solutions just come from doing a lot of things in one line. Don't worry about them, with time you'll realize what you can do all at once.
Just a note, just because a solution is short doesn't mean it's necessarily good programming or efficient. Eg. this solution is short, but inefficient (by a constant factor), and hard to read for those not as accustomed to things like this.
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
Pretty much just comes with practice. As you program more you'll realize you can do more things without resorting to dealing with it case by case.
Also, the simple python solutions just come from doing a lot of things in one line. Don't worry about them, with time you'll realize what you can do all at once.
Just a note, just because a solution is short doesn't mean it's necessarily good programming or efficient. Eg. this solution is short, but inefficient (by a constant factor), and hard to read for those not as accustomed to things like this.