Great video! One question: in order to save CPU load, could the second for starts with "int j = i", instead of "int j = 0", since the previous comparisons were already done? Thanks!
fabbarrs
Thank You so much!
Your teaching skill and solving skill is very unique from others!
Big fan!
hafizsakib
This video was very useful and the explanation is very competent, please tell me how to calculate the number of unique elements based on this code
сергеймихайлов-чщ
Really helpful. Great explanation. Thanks!
butterymcbacktail
can we write the unique elements program using pointers, if so kindly explain
AdditionalControllerExaminatio
Dear,
You have assigned matchFound = false;
so doesn't !matchfound means true?
if it is true why the program entering into 2nd condition?
because we are printing unique elements
hafizsakib
How we find that this number will be unique please help me
omvanjani
void uniqeElements(int arr[], int size)
{
int i, j;
for (i = 0; i < size; i++)
{
bool matchFound = false;
for (j = (i + 1); j < size; j++)
{
if (arr[i] == arr[j])
{
matchFound = true;
}
}
if (!matchFound)
{
printf("%d ", arr[i]);
}
}
}
Please tell me why this function is not printing the right output?