Ones and Zeroes | Leetcode 474 | DSA | HIndi Explanation | Code With Deepak
Автор: Code with Deepak
Загружено: 2025-11-10
Просмотров: 433
In this video, we solve Leetcode 474. Ones and Zeroes using Java.
Question Link - https://leetcode.com/problems/ones-an...
Solution: https://github.com/deepak-sharma-iOS/...
Summary:
This solution uses *top-down recursion with memoization* to solve the 0-1 knapsack variant.
At each string, it either *picks* the string (if enough 0s and 1s remain) or *skips* it, storing results in a 3D `dp[i][m][n]` cache.
The recursion explores all combinations and returns the *maximum subset size* that fits within the given zero and one limits.
Subscribe - / @debugwithdeepak
Github - https://github.com/deepak-sharma-iOS/...
Linkedin - / deepak-sharmaa-dev
#CodeWithDeepak #LeetCodeDailyChallenge #LeetCodeSolutions #DSAforInterviews #CodingWithExplanation #TechInterviewPrep #CrackTheCodingInterview #DailyCodingChallenge #JavaCoding #LearnToCode #CodingShorts #leetcodedailychallenge #euclidean
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: