MENU

Fun & Interesting

Prefix Sums - Problems, Code in C++ & Python

Errichto Algorithms 62,851 lượt xem 1 year ago
Video Not Working? Fix It Now

Prefix sums are the sums of the first K elements in an array. You can use them to quickly get the range sum and solve many other problems.

Range Sum - https://cses.fi/problemset/task/1646 or https://www.spoj.com/problems/CSUMQ/
Most Frequent - https://www.geeksforgeeks.org/queries-to-print-the-character-that-occurs-the-maximum-number-of-times-in-a-given-range/
Range Increase - https://www.hackerrank.com/challenges/crush/problem
Subarray Sum Equals K - https://leetcode.com/problems/subarray-sum-equals-k/
Product - https://leetcode.com/problems/product-of-array-except-self/
CF article - https://codeforces.com/blog/entry/86420

I stream on Twitch - https://www.twitch.tv/errichto
2nd YT channel - https://www.youtube.com/errichto2

Comment