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.
Answers were Sorted based on User's Feedback
Answer / nagendra
i m agree with ans 3.
ans 3 is perfect..because all labels r incorrect initially.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ushnish ranjan chatterjee
one basket of apple,least possible way of interchange-1!
one basket of orange ,least possible way of interchange-1!
another has combination of apple nd orange,te least
possible way of interchange-3C2
the least possible way of interchange-1C1+1C1+3C2=5
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / mugeshprabhu p
First put the fruits to a suitable correct labled
baskets . This is the easy way to Interchange the lables.
| Is This Answer Correct ? | 8 Yes | 10 No |
Answer / guest
Apples to apples
Oranges to oranges
combination to Apples and oranges
| Is This Answer Correct ? | 1 Yes | 3 No |
Is boolean a datatype in c?
Are local variables initialized to zero by default in c?
What is bubble sort in c?
What is the difference between procedural and functional programming?
write an algorithm and a program to count the number of elements in a circularly singly linked list
How can I make sure that my program is the only one accessing a file?
I need testPalindrome and removeSpace #include <stdio.h> #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, ©Count); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }
write a program to print %d ?
Can you tell me how to check whether a linked list is circular?
write a program to display the array elements in reverse order in c language
WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
6 Answers Finite Infotech, Lovely Professional University, Wipro,
Why pointers are used?