Explanations start at 35:02. If they are a bit unclear, feel free to ask questions in the comments below so that I can improve! If this video was helpful, be sure to like and subscribe!
Solved A: 01:35
Solved B: 04:22
Solved C: 08:08
Solved D: 18:41
Solved E1: 24:14
Solved E2: 27:58
Solved F: 34:17
Bonuses:
A: Determine if it's possible to obtain a sum that has remainder k when divided by m. n can be up to 10^5
Easy: m can be up to 10
Hard: m can be up to 5*10^4
C: Find the number of different substrings you can remove (the substrings don't have to be the shortest possible).
E2: Instead of the string s, you are given an array a, and the values of a can range from 1 to 10^9.
F: n, m can be up to 10^5
Discuss your bonus solutions in the comments below!
0 Comments