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.
Geez, people. I appreciate you trying to explain things, but let's be honest: you won't be able to explain it better than 1000 blog posts or youtube videos found on the internets. If the algorithm has a name, please use it. That's what helps more.
This HR problem is a small variation of something called Maximum subarray problem, of which its optimal algorithm is called Kadane's Algorithm. It's relatively simple. Everything is simple after you get it, I know - but this one is quite simple.
Kadane's algo deals with sub-arrays made of every element, but, if you look at other solutions, you'll see that it only needs a small change to work for the current HR problem.
Max Array Sum
You are viewing a single comment's thread. Return to all comments →
Geez, people. I appreciate you trying to explain things, but let's be honest: you won't be able to explain it better than 1000 blog posts or youtube videos found on the internets. If the algorithm has a name, please use it. That's what helps more.
This HR problem is a small variation of something called
Maximum subarray problem
, of which its optimal algorithm is calledKadane's Algorithm
. It's relatively simple. Everything is simple after you get it, I know - but this one is quite simple.Kadane's algo deals with sub-arrays made of every element, but, if you look at other solutions, you'll see that it only needs a small change to work for the current HR problem.
Here's some links that helped:
Be patient, pay attention and don't give up.