Program To Remove Duplicate Elements From an Array in C (Dec 2019) Remove Repeated Elements

preview_player
Показать описание
In this video you will learn how to remove duplicate elements from an array in c language. You will know how to remove repeated elements from array. You will be getting the best way to write the simple program for removing duplicate elments from an array.

TRY SHOPIFY FOR 14 DAYS FREE:

_____________________* C Programs List *_____________________

* Bubble Sort in C

* Palindrome of a Number in C

* Factorial of a Number using Recursion

* Factorial of a Number using Loop

* Reverse of a Number Using Recursion in C

* Reverse of a Number in C

* Rotate Array by K elements in C

* Remove Duplicate Elements from an Array in C

* Sum of Digits of a Number

* Armstrong Number in C

* Perfect Number in C

* GCD of two Numbers in C

---------------------- Support Our Channel -----------------------

--------------------------------------------------------------------------------

👉Subscribe New YouTube Channel:

👋WhatsApp: +91-9145985880
👋Skype: mohdramzaan112

👉Facebook Page:

Mr. Digitals is a leading custom software development company delivering impeccable software outsourcing services & free online courses to global professionals & customers. With a team of technocrat professionals, Mr. Digitals builds market-shaping technology solutions with deep industry knowledge and tested technology expertise to help our customers accelerate growth. Being one of the fastest-growing in Software Development, Mr. Digitals is transforming technology landscape with an empowering and transparent work culture built for our customers and people.

Please share🙏
Рекомендации по теме
Комментарии
Автор

Roses are Red
Violets are Blue
If The Title is in English The Video Should Be Too

thang
Автор

Thank you so much sir ek chhote se j--ke liye mai 24 hour soch rahatha phir jab YouTube mai serch kiya to aap ka vdo aya samne very simple and elegant vdo sir thank you so much

dashmedia
Автор

i think you are missing this important condition ...
for(int k=j;k<n-1;++k){
arr[k]=arr[k+1];
}
your loop for the innermost loop which runs in case duplictes found ... and shifts element from left to right...in case of the last element you will try to shift form the element at n+1 position and will get ArrayIndexOutOfBound Exception

amar
Автор

this is worst time complexity algorithm, we expect O(n) complexity

saniltalauliker
Автор

Sir, i was facing array index out of bound exception so, i changed k=0, k<n-1 and it worked

Tdg
Автор

helpful video, thank you, keep it up 👍👍👍👍🙂🙂🙂🙂

SmartProgramming
Автор

what is use the use of temp variable ?

tbinside
Автор

this program works for any types of array
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n, *p;
printf("Enter the size of array:\n");
scanf("%d", &n);

printf("Enter the elements of array:\n");
for(int i=0;i<n;i++)
{
scanf("%d", p+i);
}
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
if(*(p+i)==*(p+j))
{
*(p+j)=0;
}
}
}
printf("ARRAY ELEMENTS AFTER REMOVING DUPLICATES ARE:\n");
for(int i=0;i<n;i++)
{
if(*(p+i)==0)
{
continue;
}
printf("%d\t", *(p+i));
}


return 0;
}

irinkeype
Автор

why do you post subtitles in English and then have the tutorial in another language bro u push us outside.

ssekitoisaac
Автор

Which IDE are you using in the video ?

rishabhprasad
Автор

Ain't nobody likes srinivas sir from naresh it

SSS-yijz
Автор

Can u tell me to delete duplicates in 3d array

ShivaShankar
Автор

Not getting the ans, I'm getting only 4 as ans

gethsithasthuthine
Автор

You shouldve mention that it's in hindi

suborno
Автор

ads creates lots of distraction in video..plz make video ads free

salmaarani
Автор

Please explain me why I am not getting the ans, I wrote the same code, there is no error but I'm not getting answer like yours

gethsithasthuthine
Автор

jabardast ek number bro, like aur subscribe abhi krta hoon

ShubhamMishra-yvln
Автор

simple explanation helped a lot thanks

abidanjum