Pre-Computation with Prefix Sum in 1D and 2D Arrays | Competitive Programming Course Episode 13
In this episode, we explore pre-computation techniques using prefix sums in both one-dimensional and two-dimensional arrays. This is part of our comprehensive competitive programming course. For more resources, check out the Pre-Computation Techniques Pla

Luv
201.7K views β’ Feb 1, 2021

About this video
PRE-COMPUTATION TECHNIQUES PLAYLIST: https://youtube.com/playlist?list=PLauivoElc3ginp_2p2cX5i-jrBI32xGuX
FREE COMPETITIVE PROGRAMMING COURSE PLAYLIST : https://youtube.com/playlist?list=PLauivoElc3ggagradg8MfOZreCMmXMmJ-
FOR DOUBTS AND DISCUSSIONS, JOIN DISCORD : https://discord.gg/GMH23tq7Y7
In this episode 13 of my competitive programming course, I discuss about another pre-computation technique which is Prefix Sum. In this video I explain in detail how we can optimise range sum queries using prefix sum in both 1d and 2d Arrays.
PRACTICE QUESTIONS FOR HASHING & PREFIX SUM :
EASY
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/xsquare-and-double-strings-1/
https://practice.geeksforgeeks.org/problems/in-first-but-second/0
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/pair-sums/?fbclid=IwAR2XcdRMJnGwG3ojY4diVU80L41VtxP85xk2VWMZ_lUYz58kKYk2TtZN3rc
https://practice.geeksforgeeks.org/problems/max-sum-subarray-of-size-k5313/1
https://www.codechef.com/problems/ICL1905
https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/array-insert/description/
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/perfect-pair-df920e90/description/
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/perfect-pair-df920e90/
https://leetcode.com/problems/contains-duplicate/
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/bob-and-string-easy/
https://leetcode.com/problems/single-number/
https://leetcode.com/problems/contains-duplicate/
https://leetcode.com/problems/valid-anagram/
EASY MEDIUM/HARD
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/little-jhool-and-the-magical-jewels/
https://leetcode.com/problems/word-pattern/
https://leetcode.com/problems/valid-sudoku
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/a-needle-in-the-haystack-1/
https://leetcode.com/problems/rabbits-in-forest/
https://codeforces.com/contest/1426/problem/D
(for some difficult questions, you might require knowledge of c++ sets/maps)
Timestamps:
Prefix Sum in 1D Arrays : (0:00)
Prefix Sum in 2D Arrays : (9:46)
Be a part of our awesome Community. Join
β Discord : https://discord.gg/GMH23tq7Y7
β Telegram : https://t.me/LuvIsMeYT
You can follow me on below platforms for all the latest updates
β Instagram : https://www.instagram.com/i._m_.luv/
β Twitter : https://twitter.com/Luvk1412
β Linkedin : https://www.linkedin.com/in/luvk1412/
Blog(Not frequently updated)
β Blog : https://www.codewithluv.in
Hashtags
#precomputation #prefix #sum #optimise#competitiveprogramming
FREE COMPETITIVE PROGRAMMING COURSE PLAYLIST : https://youtube.com/playlist?list=PLauivoElc3ggagradg8MfOZreCMmXMmJ-
FOR DOUBTS AND DISCUSSIONS, JOIN DISCORD : https://discord.gg/GMH23tq7Y7
In this episode 13 of my competitive programming course, I discuss about another pre-computation technique which is Prefix Sum. In this video I explain in detail how we can optimise range sum queries using prefix sum in both 1d and 2d Arrays.
PRACTICE QUESTIONS FOR HASHING & PREFIX SUM :
EASY
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/xsquare-and-double-strings-1/
https://practice.geeksforgeeks.org/problems/in-first-but-second/0
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/pair-sums/?fbclid=IwAR2XcdRMJnGwG3ojY4diVU80L41VtxP85xk2VWMZ_lUYz58kKYk2TtZN3rc
https://practice.geeksforgeeks.org/problems/max-sum-subarray-of-size-k5313/1
https://www.codechef.com/problems/ICL1905
https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/array-insert/description/
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/perfect-pair-df920e90/description/
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/perfect-pair-df920e90/
https://leetcode.com/problems/contains-duplicate/
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/bob-and-string-easy/
https://leetcode.com/problems/single-number/
https://leetcode.com/problems/contains-duplicate/
https://leetcode.com/problems/valid-anagram/
EASY MEDIUM/HARD
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/little-jhool-and-the-magical-jewels/
https://leetcode.com/problems/word-pattern/
https://leetcode.com/problems/valid-sudoku
https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/practice-problems/algorithm/a-needle-in-the-haystack-1/
https://leetcode.com/problems/rabbits-in-forest/
https://codeforces.com/contest/1426/problem/D
(for some difficult questions, you might require knowledge of c++ sets/maps)
Timestamps:
Prefix Sum in 1D Arrays : (0:00)
Prefix Sum in 2D Arrays : (9:46)
Be a part of our awesome Community. Join
β Discord : https://discord.gg/GMH23tq7Y7
β Telegram : https://t.me/LuvIsMeYT
You can follow me on below platforms for all the latest updates
β Instagram : https://www.instagram.com/i._m_.luv/
β Twitter : https://twitter.com/Luvk1412
β Linkedin : https://www.linkedin.com/in/luvk1412/
Blog(Not frequently updated)
β Blog : https://www.codewithluv.in
Hashtags
#precomputation #prefix #sum #optimise#competitiveprogramming
Video Information
Views
201.7K
Likes
5.9K
Duration
24:16
Published
Feb 1, 2021
User Reviews
4.7
(40) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends