Hey Amrita can you please finish this playlist? Not sure why you stopped making videos on this 150 interview question series. But out of all the channels on youtube I found only this channel where I was able to understand the solutions easily. Please continue making more videos. 🙏 Thank you.
Hello, I am glad to know that the solutions presented here helped you. Due to some medical emergency we have reduced the pace, soon will start working on more solutions. please stay tuned. Thankyou for the understanding. 🙏
Great intuition and the approach was perfect comparing to the complex Leetcode editorial approaches.
Hey Amrita can you please finish this playlist? Not sure why you stopped making videos on this 150 interview question series. But out of all the channels on youtube I found only this channel where I was able to understand the solutions easily. Please continue making more videos. 🙏 Thank you.
Hello,
I am glad to know that the solutions presented here helped you.
Due to some medical emergency we have reduced the pace, soon will start working on more solutions. please stay tuned.
Thankyou for the understanding. 🙏
class Solution {
public int removeDuplicates(int[] nums) {
int c=0;
for(int i=0;i
class Solution {
public int removeDuplicates(int[] nums) {
int count = 0;
for (int i = 0; i < nums.length; i++) {
if (count < 2 || nums[i] != nums[count - 2]) {
nums[count] = nums[i];
}
}
return count;
}
}
@@differentytaadi8182 count should be increamented
Wow, what a great explanation and a beautiful algorithm!
Amazing, very easy explanation, thank you
Explanation is different from the code solution. If n == nums[i-2], 'i' doesn't increment in the code but in the explanation.
best explaination and clear mam, thank you so much mam
I love your teaching style
Crazy. Good job there.
Essentially this not in constant space. Because in the for loop, you are creating another copy for the array.
thank you explained well
good sol and well explained
In interviews they are going to ask in place modification of the array.
Well Explained dear
Thank u ❤❤❤
Mam, it would be great if you give your linkedin profile in the description, and also tell your full name, it would help to make connection
Great explanation. the key point is nums[i] != num[i-2]. But why in the code it becomes n != nums[i-2] ?
because here don't follow index number directly it takes value from the array , that is the main difference between
for(int i=0;i
Continue this series please
In progress 😊
how to connect with you mam..?
if array is like that 1 2 3 4 4 4 5 5 6 in that what about 2 element
mam why this solution not working
class Solution {
public int removeDuplicates(int[] nums) {
int j=0;
for(int i=0;i
class Solution {
public:
int removeDuplicates(vector& nums) {
int j=2;
int k=nums.size();
if (k
@@Sowmyakotha-lj8te see the code I will do it same
bro because we not exactly comparing i with previous i-2 element
@@mohammedmusaib4489 for this test case [1,1,1,2,2,3]
if you compare with i-2 it won't work. You have to compare with j-2
great
Cool
respect++