when will be evaluated as true/
if(x==x==x)
a) x=1;
b) x=0;
c) x=-1;
d) none
Answer Posted / ramesh
none
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
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;i
What is an expression?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is the purpose of clrscr () printf () and getch ()?
Why do we use & in c?
What is the purpose of & in scanf?
What is this pointer in c plus plus?
What is #pragma statements?
What is difference between arrays and pointers?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
What is void main ()?
Differentiate between ordinary variable and pointer in c.
What is a 'null pointer assignment' error?
What is the purpose of void in c?