This tricky Kadane’s Algorithm with a deceptively simple solution is a great introduction to more optimal problem-solving practices. Continue ...
In the process of learning algorithms, there are many case-specific solutions we need to learn. Not all can teach us broadly applicable lessons, though they’re still good to know. A few of these problems, however, are especially good for broadening our thinking and can give us tools that we can use in a broad spectrum of cases. The Maximum Subarray problem was one of these eye-opening problems for me. The solution, using Kadane’s Algorithm, is a great introduction to dynamic programming and I think taking a little extra time on this problem is worthwhile. After studying this problem I knew how to look for much more efficient solutions rather than always writing iterative solutions with inefficient nested loops. It’ll show you how to take a solution with exponential time complexity and take it to linear time complexity.
Who else loves to write side-effects-free functions? I think we, as programmers, all do. Today, in this story, I will walk you through the basic principles of functional programming that will make your coding life easier.
I previously wrote about some common coding algorithms that you’ll run into on your job search. The article was received fairly well so I thought I’d do a couple more to help in your journey to becoming more familiar with algorithms.
This article will introduce the concepts and topics common to all programming languages, that beginners and experts must know!