Leetcode 283. Move Zeroes

  Рет қаралды 12,659

Fraz

Fraz

Күн бұрын

Пікірлер: 17
@8885664452
@8885664452 Жыл бұрын
Great explanation 👌
@neelasatyasai6852
@neelasatyasai6852 Жыл бұрын
i enjoing this series
@ratnasanjay
@ratnasanjay 2 жыл бұрын
Thankyou bhaiya for this session
@coding4u585
@coding4u585 2 жыл бұрын
Thank you sir.
@vansh9857
@vansh9857 Жыл бұрын
What if the elements were not sorted like 1 3 12 what if they were 0,3,1,0,12 how do we sort them after
@pulkitchhajed3481
@pulkitchhajed3481 Жыл бұрын
by selection sort
@mohdsaadalikhan7209
@mohdsaadalikhan7209 3 жыл бұрын
how could we solve the follow-up part of this ques?
@jsuryakt
@jsuryakt 3 жыл бұрын
You can remove the while loop and make the nums[i] = 0 after nums[j++] = nums[i] and only when i !=j So it'lll be like if nums[i] != 0: nums[j] = nums[i] if i != j: nums[i] = 0 j += 1
@IitTechnologyOfficial
@IitTechnologyOfficial 8 ай бұрын
Please provide a video in Hindi
@vaishnavirathore5579
@vaishnavirathore5579 Жыл бұрын
class Solution { public void moveZeroes(int[] nums) { int a[]=new int [nums.length]; int k=0,count=0; for(int i=0;i
@ankitkumarghosh462
@ankitkumarghosh462 3 жыл бұрын
else { nums[j]=0; j++; } why this gives wrong answer
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Can you send full code ?
@ankitkumarghosh462
@ankitkumarghosh462 3 жыл бұрын
@@mohammadfraz yes class Solution { public: void moveZeroes(vector& nums) { int n = nums.size(); int j=0; for(int i =0;i
@mohammadfraz
@mohammadfraz 3 жыл бұрын
@@ankitkumarghosh462 Okay , take an example and try to dry run it in your code you will find the problem
@ankitkumarghosh462
@ankitkumarghosh462 3 жыл бұрын
@@mohammadfraz okkkkk
@satyamsingh3
@satyamsingh3 2 жыл бұрын
@@ankitkumarghosh462 did you get it?
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 104 М.
How to move Zeroes to end of an Array? | Animation
14:45
Dinesh Varyani
Рет қаралды 39 М.
Part 5. Roblox trend☠️
00:13
Kan Andrey
Рет қаралды 2,7 МЛН
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 6 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 77 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 101 МЛН
How I Failed the Google Coding Interview (and lessons I learned)
14:24
Move Zeroes - Leetcode 283 - Python
8:15
NeetCode
Рет қаралды 78 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 600 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 680 М.
Leetcode 78. Subsets
14:19
Fraz
Рет қаралды 9 М.
Medium Google Coding Interview With Ben Awad
51:27
Clément Mihailescu
Рет қаралды 1,3 МЛН
Leetcode 217. Contains Duplicate
14:32
Fraz
Рет қаралды 10 М.
Part 5. Roblox trend☠️
00:13
Kan Andrey
Рет қаралды 2,7 МЛН