Duplicate Zeros | Leetcode | Data Structures and Algorithms

preview_player
Показать описание
In this video, I will go over the solution of the Leetcode problem, "Duplicate Zeros". Lately, I've been studying data structures and algorithms in preparation for FAANG technical interviews. I will do a lot more in this series in the next couple of months, so come join the fam and the journey.

The duplicate zeros is the second problem of this journey of learning arrays data structure better. There are other data structures I want to get familiar with because I know they will assist in optimizing the algorithms I write with them.

The programming language of choice is java. I think java is an easy language to understand and to do coding interviews with it.

Chapters:
00:00 Intro
00:24 Read the Prompt
00:47 Example #1
01:42 Example #2
01:59 Logic Talk Through
02:22 Step #1
03:37 Step #2
04:09 Step #3
04:58 Step #4
05:46 Final Step
06:26 Logic Break Down
06:55 B-roll
07:18 Complexity Analysis
07:55 Outtro

// Solution to Duplicate Zeros:

Like, Share and Subscribe, Peace!
Рекомендации по теме
Комментарии
Автор

Good to see another brother in software engineering! I am a 19 yo self taught SWE from Illinois! Working at a local company, I studied DS&A a few years ago and it helped me optimize my programs. When I was 15 I use to utilize nested for loops with square complexity quite a lot haha and even used two arrays for key-value pairs instead of hash tables for constant time look up!

ronaldcolyar
Автор

whats the complexity thing you run through at the end??? Liking the videos!

SiegeWhale
Автор

If the last element of the input array is zero, it is throwing index out of range. I've tried various other combinations, but this one is failing. Can you please look into it?

DineshKumar-otvn
Автор

bro what if we start parsing from beginning rather than from back?
And what's the correct way to do so?

jaskiratsingh
Автор

Thank you brother, I'm starting a new career at 31 years old and I'm trying to teach myself data structures and algorithm and I can tell you that it's not looking promising.. god, this just doesn't make sense to me.. any tips on how to learn the theory or how to develop a daily routine to progress ?

dg_
Автор

There's a more efficient solution that takes O(N) time. You should've attempted that and not just settle for the brute force approach

Grimmjow
Автор

Hey brother can you make GitHub video how to upload and arrange just like you how you arrange folder and add links I know there is lot s of video on YouTube but they just tutorial not effective and proper guidance

pranas
Автор

Can we see the code except your face ? 8:42 mints video and the time code was shown 0.42 sec.

simardeepkaur
Автор

When the j pointer catches up to i, why does j go back to the starting point instead of remaining in the same position?

ShadowBladex
Автор

can you explain why did you put it *len - 1* and *i--* in the for loop

Alex-igpt
welcome to shbcf.ru