LeetCode 238. Product of Array Except Self [Coding Interview Solution Explained]

  Рет қаралды 4,969

Shiran Afergan

Shiran Afergan

Күн бұрын

In this video I explain the solution of a Facebook coding interview question “Product of Array Except Self” [LeetCode 238].
You can find it here -
leetcode.com/p...
This question is frequently asked in Amazon and Facebook software engineering interviews (according to LeetCode)
If there is a coding interview problem you would like me to cover, let me know in the comments.

Пікірлер: 40
@willischiejina683
@willischiejina683 2 жыл бұрын
Out of 5 explanations I've seen yours is the best, you explained the prefix/suffix part so clearly and in much shorter time than other videos. Thanks✅✅✅
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
Thanks! So glad it helped! 🎉
@yeseniaodalyss3029
@yeseniaodalyss3029 2 жыл бұрын
omg. what an amazing explanation, AND under 9 minutes. very clear and concise. thank you for uploading.
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
You’re welcome! I’m glad you enjoyed it 😊
@amanrubey
@amanrubey 2 жыл бұрын
Excellent Excellent Excellent! This is the first time when someone has explained something with this clearity and detail. It was fascinating to see the mysteries unfold. This is that 'Aha!' moment video
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
That’s awesome! I’m glad you found it :)
@quantum598
@quantum598 3 жыл бұрын
Best explanation i've seen (was able to implement in java! )
@ShiranAfergan
@ShiranAfergan 3 жыл бұрын
That’s awesome 💪🏽, I’m glad the video helped :)
@quantum598
@quantum598 3 жыл бұрын
@@ShiranAfergan Grateful to have found it! Question, not sure if you've seen LC 1010, but if you have, I am struggling with the intuition behind that :o
@ShiranAfergan
@ShiranAfergan 3 жыл бұрын
@@quantum598 I remember this question it’s a good one. I’ll see if I can make a good video on it :)
@ObserverGuy
@ObserverGuy 7 ай бұрын
omg that explaination is top notch, thanks
@bisanal-ghoul3389
@bisanal-ghoul3389 2 жыл бұрын
Best explanation!! Ur channel is very underrated. Good job and please make more videos
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
Thank you!! Working on it :)
@maheshnahak9510
@maheshnahak9510 2 жыл бұрын
Great explanation, thanks! Would love to see more of your content, I have subscribed!
@kapilvaishnav6851
@kapilvaishnav6851 3 жыл бұрын
amazing explanation! please make full course. I with you have million of subscribers.
@ShiranAfergan
@ShiranAfergan 3 жыл бұрын
Thank you! 😄
@PheezxCoding
@PheezxCoding 3 жыл бұрын
Great explanation! Thanks!
@ShiranAfergan
@ShiranAfergan 3 жыл бұрын
Thanks 😊 glad you liked it
@AnuragPandey-ni1lo
@AnuragPandey-ni1lo 2 жыл бұрын
Great Explanation... Thanks :)
@payalpatel6070
@payalpatel6070 3 жыл бұрын
Great work! Thank you.
@ShiranAfergan
@ShiranAfergan 3 жыл бұрын
You’re welcome! glad you liked it :)
@mkehat1
@mkehat1 2 жыл бұрын
why didn't you calculate the entire product and then for each place divide it by its value int product = 1; for (int i = 0; i < size; i++) { product *= nums[i]; } for (int i = 0; i < size; i++){ out[i] = product / nums[i]; }
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
The problem description says you’re not allowed to use division :)
@bocckoka
@bocckoka 2 жыл бұрын
also, it might overflow
@asabs17
@asabs17 2 жыл бұрын
מדהימה ורהוטה כבוד
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
תודה :)
@bocckoka
@bocckoka 2 жыл бұрын
Why so many downvotes? This was quite good.
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
Thanks but where are you seeing any downvotes?
@bocckoka
@bocckoka 2 жыл бұрын
@@ShiranAfergan There is a browser addon to make them visible, next to the like button, where they used to be.
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
Oh Cool. there is only one dislike though so maybe you’re seeing different numbers for some reason. Anyways I’m glad you liked the video :)
@bocckoka
@bocckoka 2 жыл бұрын
@@ShiranAfergan
@adityajagtap4349
@adityajagtap4349 2 жыл бұрын
Why all this @shiran O(n) multiply all number .. O(n) divide total of multiplies with each number. Anything I'm missing here ?
@adityajagtap4349
@adityajagtap4349 2 жыл бұрын
ohh problem says .. not to use division operation .
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
Yes :)
@RajatSingh-dg8ov
@RajatSingh-dg8ov 3 жыл бұрын
Please make system Design vids! :)
@mersadz3743
@mersadz3743 2 жыл бұрын
Thank you Python.
@ritwik121
@ritwik121 3 жыл бұрын
please can you make a video on leetcode.com/problems/shortest-subarray-with-sum-at-least-k/
@DrGecko1
@DrGecko1 2 жыл бұрын
Hey, why not multiply all of the values, keep it in a constant and then divide it by each element? Should be O(n)
@ShiranAfergan
@ShiranAfergan 2 жыл бұрын
Because the problem description says you can’t use the division operation :)
@noseygirl8655
@noseygirl8655 Жыл бұрын
I’m baffled that Google would ever reject you. What hope is there for the rest of us ?😫😂
LeetCode 721. Accounts Merge [Coding Interview Solution Explained]
14:30
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 32 МЛН
Data Structures for Coding Interviews [In 10 Minutes]
10:40
Shiran Afergan
Рет қаралды 43 М.
Product of array except self | Leetcode #238
15:00
Techdose
Рет қаралды 96 М.
Whiteboard Coding Interviews: 6 Steps to Solve Any Problem
15:18
Fullstack Academy
Рет қаралды 373 М.
238. Product of Array Except Self | Javascript
32:31
ThinkFWD
Рет қаралды 4,2 М.