There are 3 baskets of fruits with worng lables,one basket
has apple,another basket has orange,another has combination
of apple and orange,what is the least way of interchange
the lables.

Answer Posted / muthurangaraja

In this question they will say that baskets are labelled but not closed . so we can easily interchange the fruits

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I write a function that takes a format string and a variable number of arguments?

600


How is pointer initialized in c?

579


What does %c mean in c?

643


Why does everyone say not to use scanf? What should I use instead?

678


why return type of main is not necessary in linux

1697






What is omp_num_threads?

575


How can I rethow can I return a sequence of random numbers which dont repeat at all?

700


You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

2708


Write a program to check whether a number is prime or not using c?

569


What is data structure in c language?

599


Why we use int main and void main?

533


What is operator promotion?

623


Why do we use namespace feature?

577


Why we use void main in c?

590


What is break statement?

625