AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How to Solve a Cadain Algorithm With a Single Fold Primitive
Cadain's algorithm is alternatively known as the maximum sub array some problem. It basically means if you're given a list of numbers positive and negative it's important that there's some negatives. There are two ways to solve it: dynamic programming or using binary operations. The reason I wanted to know more about the folds in general but also could I solve cadain's algorithm with a single fold primitive?