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

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

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


Скачать с ютуб Product of Array Except Self | 4 Approaches | Detailed Explanation | Leetcode 238 | codestorywithMIK в хорошем качестве

Product of Array Except Self | 4 Approaches | Detailed Explanation | Leetcode 238 | codestorywithMIK 4 месяца назад


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



Product of Array Except Self | 4 Approaches | Detailed Explanation | Leetcode 238 | codestorywithMIK

Whatsapp Community Link : https://www.whatsapp.com/channel/0029... This is the 85th Video of our Playlist "Arrays 1D/2D : Popular Interview Problems". In this video we will try to solve a very famous problem : Product of Array Except Self | 4 Approaches | Detailed Explanation | Leetcode 238 Share your learnings on LinkedIn, Twitter (X), Instagram, Facebook(Meta) with the hashtag #codestorywithmik & feel free to tag me. 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. Problem Name : Product of Array Except Self | 4 Approaches | Detailed Explanation | Leetcode 238 Company Tags : Apple, LinkedIn, Amazon, Facebook, Microsoft My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie... Leetcode Link : https://leetcode.com/problems/product... 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... Subscribe to my channel :    / @codestorywithmik   Instagram :   / codestorywithmik   Facebook :   / 100090524295846   Twitter :   / cswithmik   Approaches Summary : Here's a small summary for each of the approaches: 1. Approach-1 (Using Division): - This approach calculates the product of all elements in the array without considering zeros. It then iterates through the array, dividing the product by the current element if it's not zero. If there are zero elements, special handling is required to ensure that the product for those positions is zero. - Time Complexity (T.C): O(n) - It requires a single pass through the array. - Space Complexity (S.C): O(1) - It only uses a constant amount of extra space. 2. Approach-2 (Using extra space): - This approach utilizes extra space to store the products of elements to the left and right of each element in the array. It first calculates the product of elements to the left of each element and then calculates the product of elements to the right of each element. Finally, it multiplies these two products to get the result. - Time Complexity (T.C): O(n) - It requires two passes through the array. - Space Complexity (S.C): O(n) - It uses two additional arrays of size n to store left and right products. 3. Approach-3 (Using constant space): - This approach improves upon the second approach by reducing the space complexity to constant space. It calculates the product of elements to the left of each element on the fly and then uses a variable to keep track of the product of elements to the right of each element. It effectively combines the left and right product arrays into a single array. - Time Complexity (T.C): O(n) - It requires two passes through the array, similar to the second approach. - Space Complexity (S.C): O(1) - It uses only a constant amount of extra space, excluding the space required for the output array. Each approach has its advantages and disadvantages in terms of time and space complexity, and the choice of approach depends on the specific requirements and constraints of the problem. ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗ ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣ ╠╗║╚╝║║╠╗║╚╣║║║║║═╣ ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝ ✨ Timelines✨ 00:00 - Introduction 03:23 - Approach-1 (Brute Force) 05:09 - Approach-2 (Using Division) 16:33 - Approach-3 (Using Extra Space) 22:37 - Approach-4 (Using Constant Space) 27:42 - Coding it up #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 #2024 #newyear

Comments