Remove Duplicates from Sorted Array (Google, Amazon, Microsoft…) : Explanation ➕ Live Coding

preview_player
Показать описание
This is the 2nd Video on our Two Pointer Technique playlist.
In this video we will try to solve a very famous and interesting Problem "Remove Duplicates from Sorted Array".

We will do live coding after explanation and see if we are able to pass all the test cases.

Problem Name : Remove Duplicates from Sorted Array
Company Tags : Google, Amazon, Microsoft, LinkedIn, Expedia

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview #interviewtips
#interviewpreparation #interview_ds_algo #hinglish
Рекомендации по теме
Комментарии
Автор

I seriously love the way you teach things. It becomes so easy. 
Humble, clean and crisp
Thanks as always

souravjoshi
Автор

i was struggling for this question thnks bhaiya ☺

vinodbarti
Автор

00:03 How to remove duplicates from a sorted array
01:24 Identify and remove duplicate elements from a sorted array
02:35 Understanding the role of the index for unique elements
03:30 Identifying and removing unique elements from array.
04:21 Creating space for unique elements in an array.
05:32 Identifying and sending unique elements in a sorted array.
06:17 Removing duplicates in place from a non-decreasing order array.
06:56 Modify the input to find unique elements and create a solution.
Crafted by Merlin AI.

matkarharsh
Автор

one of the best explanation, very very thanks bhai for very very easy explanation, salute for you

abhipathak
Автор

Bro just casually dropped best 2 ptr playlist

matkarharsh
Автор

its related to yesterdays potd, amazing sir!

sanyaadoda
Автор

You made both 'i' and 'j' best friends in this story :)
Thank you for explaining bhaiya

ashwin_anand_dev
Автор

Bhai kya sahi solution, half way of the video, I understood, and solved it

rdrahuldhiman
Автор

Though it was easy question, believe me subah 9 baje se laga tha iss ke peeche, was struggling for the logic, just saw this video at 5pm, half video me hi clear ho gaya !
Thanks SIR !!

ammarshaikh
Автор

Laal fool
Nilaa fool
Mik bhai beautiful ❤🎉

MohammedHasmi
Автор

amazing sir, your way of teaching is great😇

livehappy
Автор

Hey bro.... You helped me a lot with this video. Do you explain with javascript as well?

shriyanshtiwari
Автор

We can also use hashset to solve this question Hashset gives all unique elements from an array

PrathamSrivastav-od
Автор

Bro iam not able to get the logic fadtly iam not able to think thatvwe can do with two points i, j😢

kuruvellateju
Автор

It is showing an error
error: cannot find symbol
int n = nums.size();
^
symbol: method size()
location: variable nums of type int[]

shanyasharma
Автор

we can also do it without using two pointer
class Solution {
public int removeDuplicates(int[] nums) {

int k=1;

for(int i=1;i<nums.length;i++){
if(nums[i]!=nums[i-1]){
nums[k]=nums[i]
;
k=k+1;
}
}
return k;
}
public void main (String[] args){
int []n1={1, 1, 2};

}
}

ashu
welcome to shbcf.ru