PRODUCT OF TWO RUN-LENGTH ENCODED ARRAYS | PYTHON | LEETCODE # 1868

  Рет қаралды 3,690

Cracking FAANG

Cracking FAANG

Күн бұрын

Пікірлер: 12
@cc-to2jn
@cc-to2jn 28 күн бұрын
I think the Time complexity and space complexity is actually: Max(N,M)
@mohammadkareem1187
@mohammadkareem1187 2 жыл бұрын
Thanks for the clear explanation and great video. My only comment is to use a pen rather than a mouse when you write. Good luck
@crackfaang
@crackfaang 2 жыл бұрын
Totally agree with you but the channel is still too small to warrant buying an iPad + magic pencil just to write a little bit cleaner. I see the video analytics and most people just jump to the code anyway so the cost/benefit of investing in that right now is not skewed in the right direction. I probably will eventually because using a mouse sucks 😂
@mohammadkareem1187
@mohammadkareem1187 2 жыл бұрын
@@crackfaang if I pass my upcoming interview, I will buy you an iPad + magic pencil ;)
@92AkshaySharma
@92AkshaySharma Жыл бұрын
man good job explaining this one.
@SriHarshaBolisetti
@SriHarshaBolisetti 2 жыл бұрын
Perfect explanation :)
@lcgrind
@lcgrind 9 ай бұрын
Ty! I had the same intuition in terms of optimizating the solution, but couldn't translate it into code. How would you update your solution if modifying the input is not allowed?
@lcgrind
@lcgrind 9 ай бұрын
Answering my own Q if anyone else wonders; we can create two additional variables to keep track of the frequencies; init these to the frequency for the first val/freq element of the encoded array (repsectveily); in each iteration, get the min frequency and substract these from the two variables. If their value is 0, advance their respective pointer, and retrieve the frequency only if their pointer is less than their respective encoded size. I hope this helps others! and GL with your prep!
@bhushankhope8949
@bhushankhope8949 11 ай бұрын
Nice explanation.
@abhi23pawar
@abhi23pawar 9 ай бұрын
What about carry? say 9x9 = 81
@TheSmashten
@TheSmashten Ай бұрын
Such a confusing question.
KOKO EATING BANANAS | PYTHON | LEETCODE # 875
22:46
Cracking FAANG
Рет қаралды 2 М.
Don't underestimate anyone
00:47
奇軒Tricking
Рет қаралды 16 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
Lebanon
22:25
RUTAMOTOR
Рет қаралды 1,7 М.
DOT PRODUCT OF TWO SPARSE VECTORS - 3 SOLUTIONS EXPLAINED [PYTHON]
31:06
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 116 М.
you will never ask about pointers again after watching this video
8:03
Dear Functional Bros
16:50
CodeAesthetic
Рет қаралды 553 М.
ROBOT ROOM CLEANER | LEETCODE # 489 | PYTHON BACKTRACK SOLUTION
19:44
Cracking FAANG
Рет қаралды 11 М.
GROUP SHIFTED STRINGS | LEETCODE 249 | PYTHON SOLUTION
15:07
Cracking FAANG
Рет қаралды 3,6 М.
LOWEST COMMON ANCESTOR OF A BINARY TREE III [PYTHON]
16:38
Cracking FAANG
Рет қаралды 12 М.
EXCLUSIVE TIME OF FUNCTIONS | LEETCODE 636 | PYTHON SOLUTION
15:42
Cracking FAANG
Рет қаралды 6 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 148 М.