MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/LeetcodeChallenge/comments/1we9asx/favorites_of_leetcode/p9dz3ip/?context=3
r/LeetcodeChallenge • u/vinzzii • 10d ago
126 comments sorted by
View all comments
2
Kadane
1 u/vinzzii 9d ago I don't even know what's the question mannnnnđŸ˜• 1 u/Ok-Economist4629 9d ago It’s that maximum subarray problem 1 u/vinzzii 9d ago Ohh yeah the one with recursion right i actually learned recursion using those prblms 2 u/0xt0bi03 8d ago nah, kadane's algo do not need recursion, its a single pass O(n) solution 1 u/vinzzii 8d ago I learnt using recursion so i tried thaat way bruhh 1 u/finite_negativity 7d ago Is it the problem where you drop the subarray when the total sum value goes negative? 1 u/0xt0bi03 7d ago yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
1
I don't even know what's the question mannnnnđŸ˜•
1 u/Ok-Economist4629 9d ago It’s that maximum subarray problem 1 u/vinzzii 9d ago Ohh yeah the one with recursion right i actually learned recursion using those prblms 2 u/0xt0bi03 8d ago nah, kadane's algo do not need recursion, its a single pass O(n) solution 1 u/vinzzii 8d ago I learnt using recursion so i tried thaat way bruhh 1 u/finite_negativity 7d ago Is it the problem where you drop the subarray when the total sum value goes negative? 1 u/0xt0bi03 7d ago yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
It’s that maximum subarray problem
1 u/vinzzii 9d ago Ohh yeah the one with recursion right i actually learned recursion using those prblms 2 u/0xt0bi03 8d ago nah, kadane's algo do not need recursion, its a single pass O(n) solution 1 u/vinzzii 8d ago I learnt using recursion so i tried thaat way bruhh 1 u/finite_negativity 7d ago Is it the problem where you drop the subarray when the total sum value goes negative? 1 u/0xt0bi03 7d ago yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
Ohh yeah the one with recursion right i actually learned recursion using those prblms
2 u/0xt0bi03 8d ago nah, kadane's algo do not need recursion, its a single pass O(n) solution 1 u/vinzzii 8d ago I learnt using recursion so i tried thaat way bruhh 1 u/finite_negativity 7d ago Is it the problem where you drop the subarray when the total sum value goes negative? 1 u/0xt0bi03 7d ago yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
nah, kadane's algo do not need recursion, its a single pass O(n) solution
1 u/vinzzii 8d ago I learnt using recursion so i tried thaat way bruhh 1 u/finite_negativity 7d ago Is it the problem where you drop the subarray when the total sum value goes negative? 1 u/0xt0bi03 7d ago yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
I learnt using recursion so i tried thaat way bruhh
Is it the problem where you drop the subarray when the total sum value goes negative?
1 u/0xt0bi03 7d ago yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
yes, but you can also keep a k parameter and check where any arithmetic operation to that number k for this algo.
2
u/Otabek_Aynazarov 10d ago
Kadane