- 43
- 24 817
Decipher Algorithms with Saptarshi
Приєднався 24 кві 2017
Hey, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces and 6 star at Codechef, Former Educator and Mentor at Unacademy/Codechef and other institutes, etc. I'm a BTech Hons. (CSE) alumnus of IIT Bhilai, with research experience most prominently in Blockchain and Edge Computing. I've been a former member of National Blockchain Project, IIT Kanpur.
Some old achievements include AIR 5 in ISC 2017 (+2 Board Exam), AIR 406 in KVPY SA 2015, AIR 1260 in JEE Mains, AIR 5120 in JEE Adv., 3 times in top 2000 in FB Hacker Cup, HackWithInfy Finalist, Top 10 in Expedia Hackathon, and a few more.
I like programming and teaching, and have professionally taught ~3000 students. My dream is to use my love for programming to develop and enhance intuition-building and programming skills in budding programming enthusiasts and help them excel in their coding journeys. Welcome to the channel!
Some old achievements include AIR 5 in ISC 2017 (+2 Board Exam), AIR 406 in KVPY SA 2015, AIR 1260 in JEE Mains, AIR 5120 in JEE Adv., 3 times in top 2000 in FB Hacker Cup, HackWithInfy Finalist, Top 10 in Expedia Hackathon, and a few more.
I like programming and teaching, and have professionally taught ~3000 students. My dream is to use my love for programming to develop and enhance intuition-building and programming skills in budding programming enthusiasts and help them excel in their coding journeys. Welcome to the channel!
Leetcode Weekly Contest 405 Problems 1 to 4 | Bit Manipulation, Trie DP | Java Implementation
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc.
00:00:00 Introduction
00:00:47 Understanding Problem 1
00:02:06 Strategy Building Problem 1 (Don't miss the in-place soln)
00:06:58 Coding Implementation Problem 1
00:09:11 Understanding Problem 2
00:09:58 Strategy Building Problem 2
00:13:07 Coding Implementation Problem 2
00:16:35 Understanding Problem 3
00:18:28 Strategy Building Problem 3
00:22:53 Coding Implementation Problem 3
00:24:08 Understanding Problem 4
00:24:59 Strategy Building Problem 4
00:37:02 Coding Implementation Problem 4
00:43:37 Closure
Contest Link: leetcode.com/contest/weekly-contest-405/
My Codeforces Profile: codeforces.com/profile/saptarshi1729
My LinkedIn Profile: www.linkedin.com/in/saptarshi-mukherjee-52660616b/
00:00:00 Introduction
00:00:47 Understanding Problem 1
00:02:06 Strategy Building Problem 1 (Don't miss the in-place soln)
00:06:58 Coding Implementation Problem 1
00:09:11 Understanding Problem 2
00:09:58 Strategy Building Problem 2
00:13:07 Coding Implementation Problem 2
00:16:35 Understanding Problem 3
00:18:28 Strategy Building Problem 3
00:22:53 Coding Implementation Problem 3
00:24:08 Understanding Problem 4
00:24:59 Strategy Building Problem 4
00:37:02 Coding Implementation Problem 4
00:43:37 Closure
Contest Link: leetcode.com/contest/weekly-contest-405/
My Codeforces Profile: codeforces.com/profile/saptarshi1729
My LinkedIn Profile: www.linkedin.com/in/saptarshi-mukherjee-52660616b/
Переглядів: 440
Відео
CSES DP Problemset | Book Shop | 0/1 KNAPSACK DP | Space Reduction
Переглядів 1542 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This video is on CSES Book Shop problem, based on a classic "0/1 Knapsack" DP Category. Previous foundational video: - Basic DP Concepts: ua-cam...
CSES DP Problemset | Grid Paths | 2D Number of Paths DP
Переглядів 1352 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This video is on Grid Paths problem, based on a classic "No. of paths in a 2D grid". Previous foundational video: - Basic DP Concepts: ua-cam.co...
CSES DP Problemset | Remaining Digits | Min number of steps DP
Переглядів 832 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This video is on Remaining Digits problem, based on a classic "Min No. of steps" DP Category. Previous foundational videos: - Basic DP Concepts:...
Codeforces Round 955 A-D | Editorial with TOURIST's solutions | Detailed Explanations
Переглядів 8982 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This is an adventurous attempt to discuss the solutions of the legendary competitive programmer TOURIST (Gennady Korotkevich) and learn stuff! 0...
CSES DP Problemset | Coin Combinations - II | 2D to 1D DP Transition
Переглядів 2832 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This video is on Coin Combinations - II problem, based on a classic "No. of ways" DP Category but that gets tough due to an interesting "ordered...
CSES DP Problemset | Coin Combinations - I | DP Approach + Implementation
Переглядів 1722 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This video is on Coin Combinations - I problem, based on a classic "No. of ways" DP Category. Previous foundational videos: - Basic DP Concepts:...
Minimization DP from scratch | CSES DP Problemset | Minimizing Coins | DP Approach + Live Coding
Переглядів 4893 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. Precursor: Basic DP concept - ua-cam.com/video/nynhzVBeXkU/v-deo.html Here's the second video of problem editorial from CSES problemset. 00:00:0...
Basics of DP | Recursion in depth | Memoization vs Tabulation - Which is Better?
Переглядів 1,1 тис.3 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This video covers a very significant milestone of DSA and Competitive Programming: the basics of Recursion, DP, and the types of DP implementati...
CSES DP Problemset | Dice Combinations | DP Approach + Implementations | Live Coding
Переглядів 6674 місяці тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. In this series of videos, I'll be covering how to solve DP Problems using the awesome CSES Problemset. Each explanation shall be followed by Liv...
Codeforces Round 937 (Div 4) | Problems A - G | Live Coding and Commentary
Переглядів 2 тис.5 місяців тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. 00:00:00 Introduction 00:03:34 Problem A 00:03:48 Live Coding A 00:05:57 Problem B 00:06:37 Logic discussion B 00:07:59 Live Coding B 00:09:46 A...
Codeforces Round 934 Problems A to D Editorial | Live coding
Переглядів 6836 місяців тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. 00:00:00 Introduction 00:00:33 How my contest went 00:02:50 Problem A 00:04:20 Intuition Building 00:12:26 Live coding in Java 00:13:45 Problem ...
Codeforces Educational Round 163 Editorial
Переглядів 5086 місяців тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. 00:00:00 Introduction 00:01:10 How my contest went 00:01:48 Problem A 00:03:41 Intuition Building and solution 00:10:41 Problem B 00:13:47 Intui...
DP + Prefix Tricks | Buy and Sell Stocks IV | LC Hard Problem | Codeforces Round 932 Problem C
Переглядів 8846 місяців тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This session is on a very frequently appearing topic on CP contests: DP Prefix Tricks. Please share with your friends who may find this informat...
Codeforces Round 932 Editorial (B, C, D, E) with TOURIST's Solutions | Saptarshi Mukherjee
Переглядів 9936 місяців тому
Hello everyone, I'm Saptarshi Mukherjee, a Software Engineer III at Google and a Competitive Programmer with some titles like 3 times ACM-ICPC Regionals, Former Master at Codeforces, and 6 star at Codechef, Former Educator and Mentor at Unacademy, etc. This is an attempt to discuss the solutions of the legendary competitive programmer TOURIST (Gennady Korotkevich) in Codeforces Round 932 and le...
Codeforces Round 930 Editorial (D, E) | Saptarshi Mukherjee
Переглядів 5536 місяців тому
Codeforces Round 930 Editorial (D, E) | Saptarshi Mukherjee
Codeforces Round 930 Editorial (A, B, C) | Saptarshi Mukherjee
Переглядів 4496 місяців тому
Codeforces Round 930 Editorial (A, B, C) | Saptarshi Mukherjee
DP on Trees | Coin DP in Tree | Problem E of Codeforces Edu Round 162 (Div 2)
Переглядів 1,9 тис.6 місяців тому
DP on Trees | Coin DP in Tree | Problem E of Codeforces Edu Round 162 (Div 2)
Codeforces Round 927 Editorial (F, G) with TOURIST's Solutions | Saptarshi Mukherjee
Переглядів 2,2 тис.6 місяців тому
Codeforces Round 927 Editorial (F, G) with TOURIST's Solutions | Saptarshi Mukherjee
Codeforces Round 927 Editorial (C, D, E) with TOURIST's Solutions | Saptarshi Mukherjee
Переглядів 2,4 тис.6 місяців тому
Codeforces Round 927 Editorial (C, D, E) with TOURIST's Solutions | Saptarshi Mukherjee
Leetcode Weekly Contest 385 Problems 1 & 4 - Count Prefix and Suffix Pairs | Saptarshi Mukherjee
Переглядів 1927 місяців тому
Leetcode Weekly Contest 385 Problems 1 & 4 - Count Prefix and Suffix Pairs | Saptarshi Mukherjee
Leetcode Weekly Contest 385 Problem 3 - Most Frequent Prime | Saptarshi Mukherjee
Переглядів 777 місяців тому
Leetcode Weekly Contest 385 Problem 3 - Most Frequent Prime | Saptarshi Mukherjee
Leetcode Weekly Contest 385 Problem 2 - Length of Longest Common Prefix | Saptarshi Mukherjee
Переглядів 1537 місяців тому
Leetcode Weekly Contest 385 Problem 2 - Length of Longest Common Prefix | Saptarshi Mukherjee
Leetcode Weekly Contest - 385 Short Summary | Saptarshi Mukherjee
Переглядів 787 місяців тому
Leetcode Weekly Contest - 385 Short Summary | Saptarshi Mukherjee
Codeforces Round 923 | Problems B, C, D | Saptarshi Mukherjee
Переглядів 1617 місяців тому
Codeforces Round 923 | Problems B, C, D | Saptarshi Mukherjee
Codeforces Round 923 | Problem F (Microcycle) using 2 Different Approaches | Saptarshi Mukherjee
Переглядів 3047 місяців тому
Codeforces Round 923 | Problem F (Microcycle) using 2 Different Approaches | Saptarshi Mukherjee
Codeforces Round 923 | Problem G (Paint Charges) | Saptarshi Mukherjee
Переглядів 4917 місяців тому
Codeforces Round 923 | Problem G (Paint Charges) | Saptarshi Mukherjee
Codeforces Round 923 - Short Summary | Saptarshi Mukherjee
Переглядів 1737 місяців тому
Codeforces Round 923 - Short Summary | Saptarshi Mukherjee
Codeforces Round 923 | Problem A (Make it White) | Saptarshi Mukherjee
Переглядів 777 місяців тому
Codeforces Round 923 | Problem A (Make it White) | Saptarshi Mukherjee
Codeforces Round 923 | Problem E (Klever Permutation) | Saptarshi Mukherjee
Переглядів 1597 місяців тому
Codeforces Round 923 | Problem E (Klever Permutation) | Saptarshi Mukherjee
best explantion sir ,, thanks
Sir please post some new vidio .Your vidio teaches a lot please come with some dp on tree ,rerooting or in out dp content
really helped a lot .
pls complete this playlist
@@mrcow6531 hey thanks for the comments. Sorry to share, I've stopped working on this... All the best!
i am newbie but still i watching D,E problem because your explanation is really good.
thats called the explanation of dp .Any level of programmer can understand how you understand this .bro do not stop making like this video though your video view is less .
The way of approaching questions IS really outstanding.
Thanks sir
What is the macbook do you use please
Hi, I really like your explanation and approach. Could you please share the pdf of what you have explained in the video (in fact all the videos)? It would be really helpful for me. Looking forward for more such amazing content!
Hello Sir, My C++ recursive code giving TLE for two large cases can you pls review it :) //? Coin combinations CSES problem set #include <bits/stdc++.h> using namespace std ; #define MOD 1000000007 #define ll long long ll rec(vector <ll> &v , ll target , vector <ll> &memo) { if( memo[ target ] > 0) return memo[target] ; if(target == 0) return 1 ; ll sum = 0 ; for(ll i = 0 ; i < v.size() ; i ++) { if(target - v[i] < 0) break; sum += rec(v , target - v[i] , memo) ; sum = sum % MOD ; } memo[target] = sum ; return sum ; } int main () { ll n , x ; cin >> n >> x ; vector <ll> v(n) ; for(ll i = 0 ; i < n ; i++) cin >> v[i] ; sort(v.begin() , v.end()) ; vector <ll> memo (x + 1 , -1) ; memo[0] = 1 ; ll ans = rec(v , x , memo) ; cout << ans ; }
Hey pls upload more
@@mrcow6531 Thanks, I'm into few things. Will upload more soon.
completed the whole playlist It's hard to find such good content on UA-cam....request please complete the whole cses dp problems dada!!
Pls upload more
upload pls
upload more pls
19:56 For 9, wouldn't the dp formulation turn out to be 1+min(3,1,3) instead of 1+min(5,1,3) as the minimum number of coins required to reach a sum of 9 is 1+1+7 i.e 3.
Yeah indeed, that's right!
My honest review is not to make videos so long for these type of questions But good content 😊
Watched the video completely. Probably the most lucid video on DP present on YT. Thank you for sharing your knowledge. It was indeed really helpful.
beautiful ..wow wow wow
just 0/1 knapsack
How is this solution sir? var getEncryptedString = function(s, k) { let len = s.length if(k === len) return s; if(k > len) { k = k % len } return s.slice(k) + s.substring(0,k) };
hey yeah, this is the standard solution, and it's correct. If you're asked to make changes within the same string (please check if it's possible for a js string, otherwise imagine a character array), then my technique shall help.
Great content sir. I am a junior developer and started my junior this month. I am very poor in DSA but now I am solving some problems in leetcode, can you please do this in javascript?
Thanks! I believe you can translate each step from Java/C++ to JS. That shall ensure that you understand each line of code well and you're translating to Java. You may ask in the comments if you face any specific challenges. Cheers!
why java ??😭😭😭😭😭
Haha I don't use any strong Java-specific thing. I can make in C++ as well, 90% of the code would look the same.
struct customPair{ long long paths; map<int, int> freq; // store frquency of colors customPair(long long &paths, map<int, int> &freq){ this -> paths = paths; this -> freq = freq; } }; customPair dfs(int node, int parent, vector<vector<int>>&adj, vector<int> &colors){ long long ans = 0; int currColor = colors[node]; map<int, int> freq; for (auto child: adj[node]){ if (child == parent) continue; customPair cAns = dfs(child, node, adj, colors); ans += cAns.paths; map<int, int> &childFreq = cAns.freq; ans += childFreq[currColor]; if (childFreq.size() > freq.size()){ freq.swap(childFreq); } for (auto color: childFreq){ if (color.first == currColor) continue; ans += childFreq[color.first] * freq[color.first]; freq[color.first] += childFreq[color.first]; } } freq[currColor] = 1; return customPair(ans, freq); } void solve(){ int n; cin>> n; vector<int> colors(n + 1); for (int i = 1; i <= n; i++) cin >> colors[i]; vector<vector<int>> adj(n + 1); for (int i = 0; i < n - 1; i++){ int u, v; cin >> u >> v; adj[u].push_back(v); adj[v].push_back(u); } customPair ans = dfs(1, -1, adj, colors); cout << ans.paths << nline; } This is giving TLE on 15th test case in C++
bhai please yaar regular karo yaar india me quality explainer kum hi hai
Bhayya please continue your dp cses problemset
Great work Sir
great explanation sir
please make videos on advenced topic in cp
Noice explained ❤
appreciate your efforts ❤
Y r u laughing
Bhaiya beech beech k contest misa ho jate apse bhabhi ki kasam doobara du kya 🙂
bhayya please continue why have you stopped??
Just uploaded one, will try to complete the series. Thanks for reminding!
Hey can you make a video on setting up Java env for competitive programming?
I was grinding with this question for the last 3days. I'm also weaker in bit operation and bit intuition. And YOUR VIDEO CAME AS A SAVIOR. I got the clearest understanding of xor operation and bit intuition. Thanks a tonnnnnnn!.
please continue sir
thnx a lot. nice video. also if possible explain some recent cf dp question 1800+ in practice session . ur explaination skills are very good.
Please continue this series
Darun video dada
bro stop fucking flexing yourself at the start of every video. It's sounds so scummy to start off with self appraisal.
great series keep on continuing with this amazing series . Would love on your take on how to improve in CP
I was thinking of another lecture after your first one on dp and went to check it came or not saw this uploaded exact that moment.... cool😅...
Subscribed. Bhaiya Nice way of teaching. If possible after this series make one on Binary Search on answer
Great Explanation dada.
Great Explanation!
Please continue this series.Great work
A great explaination!
Bring a total playlist for an absolute beginner in DP :)