Solving Amazon's 2024 Most Asked Coding Question

  Рет қаралды 6,796

AlgosWithMichael

AlgosWithMichael

Күн бұрын

Пікірлер: 13
@danieladaniel2004
@danieladaniel2004 6 ай бұрын
I love the way you explain these problems.
@adilansari-hq9ge
@adilansari-hq9ge 6 ай бұрын
Awesome Video. I have been missing your videos Michel, please keep uploading.
@kmesh9
@kmesh9 6 ай бұрын
Good explanation, although it would've been good to clarify that it's not pointers moving backwards that allow us to skip most iterations from the bruteforce solution, but rather sliding window algorithm itself. You can reverse the solution and it would work perfectly as well - pointers go from left to right, but you do substrings from right to left (imo it would be a bit more intuitive to those already familiar with sliding window algorithm). You can even use something like ".endsWith(invalid[i])", though it would make time complexity a O(n*m*k), where k is length of the invalid array so with given constraints it would be worse, but generally might be better/same time complexity
@isaacojigho4481
@isaacojigho4481 6 ай бұрын
Hey Michael this was a great video and I really appreciate it. Could you please provide the link for the list of questions you got this question from. you showed the page briefly at the 0:07 sec mark. the link to all questions by amazon in 2024 would be very helpful
@lylez00
@lylez00 3 ай бұрын
I've been interviewing lately, and I'm not encountering any of these "common questions" I'm seeing on KZbin. They're all different, and they're all hard. My question today - just the question and the examples of solutions was 63 lines, and I had about 20 minutes to solve it. I am so sick of the IT industry!
@duparcg
@duparcg 3 ай бұрын
all the leetcodes you see online is bullshit. Most companies have theior custom ones and they are very hard. You have to get lucky bevause even if you understand its still going to be hard to solve and you may not even understand the problem after reading 100 times lol. KZbin is a joke for software engineer trust me. even when you work as an engineer you wont be the crap peiople teach on youtube
@AlgosWithMichael
@AlgosWithMichael 2 ай бұрын
This is exactly why studying patterns instead of specific problems is necessary for today's interviews. Probably gonna make a video talking about this
@shenth27
@shenth27 15 күн бұрын
​@@AlgosWithMichaelI agree. I'd been interviewed by amazon few times and I got most of the questions with similar patterns. Infact as a Software Engineer working in the industry for about 10years, it's not that hard to pass the amazon coding challenges, IF I've time to practice the blind 150 leetcode questions.
@allasbheen2634
@allasbheen2634 6 ай бұрын
Explained great 👏👏👏
@LunaticZombie
@LunaticZombie 3 ай бұрын
Could you plz check following case: Forbidden=[de, le, e, mp] word=leetcodmpe Algo in video would give tcod as answer, but answer should be tcodm Am I missing something? Basically, thinking about matching substring of more than 1 length..
@kiranimmanni81
@kiranimmanni81 6 ай бұрын
Hi Michael, that’s a great explanation, though I noticed a small correction needed for your time complexity calculation. You forgot to include `invalid.contains(substring)`, which has a complexity of O(K) in this case (where K is 10^5, the length of the forbidden substring). So, the corrected time complexity is: O(N) { O(M) { O(M) + O(K) } } Thus, the total time complexity is O(N * M * (M + K)), or more succinctly, O(N * M^2 * MK). Hope this helps clarify! 😊
@kmesh9
@kmesh9 6 ай бұрын
"invalid" is a hash map so I assume time complexity for it would be O(1)
Solving Meta's 2024 Most Asked Interview Question
13:45
AlgosWithMichael
Рет қаралды 3,2 М.
Amazon Coding Question - Insert Delete GetRandom O(1)
11:54
AlgosWithMichael
Рет қаралды 11 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 301 М.
Amazon Coding Interview Question - Number of Distinct Islands
17:43
AlgosWithMichael
Рет қаралды 27 М.
TypeScript Data Types - JavaScript, Typescript, Python, Go & Rust
1:27:17
Meta Coding Question - Random Pick With Weight (LeetCode 528)
14:41
AlgosWithMichael
Рет қаралды 4,5 М.
10 Math Concepts for Programmers
9:32
Fireship
Рет қаралды 2 МЛН
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,2 МЛН
Why I Use C | Prime Reacts
13:00
ThePrimeTime
Рет қаралды 196 М.
Amazon Coding Interview Question - First Missing Positive (LeetCode)
20:47
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 692 М.
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 246 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН