×

Gaurav Sen's video: AlgoWorkout: Tricky Dynamic Programming with Subarrays

@AlgoWorkout: Tricky Dynamic Programming with Subarrays 🧠💪
This is an interesting interview question on finding the number of subarrays having a fixed ratio of ones and zeros. We discuss an elegant approach to the problem, and find out why it works efficiently. 00:00 Intro 01:36 Brute Force Approach 01:51 Modified Brute Force 04:20 Changing Ratios to Sums 05:24 Prefix Sums 06:31 First Observation 07:42 Second Observation 10:00 Solution 11:23 Order Complexity 12:36 Thanks! Code link: https://github.com/coding-parrot/Competitive-Programming/blob/master/src/main/java/main/java/videos/FindSubarrays.java Prefix sums: https://youtu.be/9HEvEObci80?t=784 Similar problem statement: https://codeforces.com/contest/1536/problem/C This problem was brought to our attention by Neer Patel (drexer) 😁 Looking to ace your next interview? Try this System Design video course! 🔥 https://get.interviewready.io Course chapters: 1) Design an email service like Gmail 2) Design a rate limiter 3) Design an audio search engine 4) Design a calling app like WhatsApp 5) Design and code a payment tracking app like Splitwise 6) Machine coding a cache 7) Low level design of an event bus like Kafka The chapters have architectural diagrams and capacity estimates, along with subtitled videos. Use the coupon code of 'earlybird' to get a 20% discount. System Design Playlist: https://www.youtube.com/playlist?list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX Software Engineering Fundamentals: https://www.youtube.com/playlist?list=PLMCXHnjXnTntYbKsUs6Pj8_BO_8ou4y07 You can follow me on: Discord: https://discord.gg/YByFvURXe3 LinkedIn: https://www.linkedin.com/in/gaurav-sen-56b6a941/ Github link: https://github.com/coding-parrot/Low-Level-Design Instagram: https://www.instagram.com/applepie404/ Quora: https://www.quora.com/profile/Gaurav-Sen-6 Twitter: https://twitter.com/gkcs_

407

54
Gaurav Sen
Subscribers
562K
Total Post
292
Total Views
8.9M
Avg. Views
54.2K
View Profile
This video was published on 2021-06-09 21:31:06 GMT by @Gaurav-Sen on Youtube. Gaurav Sen has total 562K subscribers on Youtube and has a total of 292 video.This video has received 407 Likes which are lower than the average likes that Gaurav Sen gets . @Gaurav-Sen receives an average views of 54.2K per video on Youtube.This video has received 54 comments which are lower than the average comments that Gaurav Sen gets . Overall the views for this video was lower than the average for the profile.Gaurav Sen #DynamicProgramming #Subarrays #Algorithms has been used frequently in this Post.

Other post by @Gaurav Sen