Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Trapping Rain Water | without stack | Made Super Easy | Leetcode 42 | codestorywithMIK в хорошем качестве

Trapping Rain Water | without stack | Made Super Easy | Leetcode 42 | codestorywithMIK 1 год назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Trapping Rain Water | without stack | Made Super Easy | Leetcode 42 | codestorywithMIK

Whatsapp Community Link : https://www.whatsapp.com/channel/0029... This is the 4th Video of our Playlist "Arrays 1D/2D: Popular Interview Problems". In this video we will try to solve a very famous problem : Trapping Rain Water | without stack | Made Super Easy | Leetcode 42 | Leetcode codestorywithMIK I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY. We will do live coding after explanation and see if we are able to pass all the test cases.  Also, please note that my Github solution link below contains both C++ as well as JAVA code. Problem Name : Trapping Rain Water | without stack | Made Super Easy | Leetcode 42 | Leetcode codestorywithMIK Company Tags  : Accolite, Adobe, Amazon, D-E-Shaw, MakeMyTrip, Microsoft, Payu My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie... Leetcode Link  : https://leetcode.com/problems/trappin... My DP Concepts Playlist :    • Roadmap for DP | How to Start DP ? | ...   My Graph Concepts Playlist :    • Graph Concepts & Qns - 1 : Graph will...   My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And...   My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Intervie... Instagram :   / codestorywithmik   Facebook :   / 100090524295846   Twitter :   / cswithmik   Subscribe to my channel :    / @codestorywithmik   Summary : This code implements the trapping rain water problem using a two-pass approach. The `trap` function calculates the amount of water that can be trapped between the bars given their heights. It first computes two arrays: `leftMax` and `rightMax`, which store the maximum height encountered from the left and right directions respectively, up to each index. Then, it iterates through each bar and calculates the amount of water that can be trapped at that position by taking the minimum of the left and right maximum heights and subtracting the height of the current bar. Finally, it sums up these amounts for all bars and returns the total trapped water. In summary, the algorithm computes the left and right maximum heights for each position in linear time, then calculates the trapped water for each bar in a single pass, resulting in a time complexity of O(n), where n is the number of bars. ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗ ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣ ╠╗║╚╝║║╠╗║╚╣║║║║║═╣ ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝  Timelines 00:00 - Introduction #codestorywithMIK #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #newyear2024

Comments