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. 🙏
Just love the way you explain...and logic hits the brain 🧠
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
Great intuition and the approach was perfect comparing to the complex Leetcode editorial approaches.
Wow, what a great explanation and a beautiful algorithm!
I love your teaching style
best explaination and clear mam, thank you so much mam
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.
Essentially this not in constant space. Because in the for loop, you are creating another copy for the array.
Crazy. Good job there.
In interviews they are going to ask in place modification of the array.
thank you explained well
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
Well Explained dear
good sol and well explained
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
Thank u ❤❤❤
Continue this series please
In progress 😊
if array is like that 1 2 3 4 4 4 5 5 6 in that what about 2 element
great
Cool
how to connect with you mam..?
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
respect++