Write a C function to search a number in the given list of
numbers. donot use printf and scanf
Answer Posted / vignesh1988i
ya..... sorry... it wont work... since getchar gets only one
character the time.... when we give 48... i will take 4 and
8 .. but not as 48.... sorry for posting it... a lesson i
have learnt
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What functions are used in dynamic memory allocation in c?
Explain what is gets() function?
What is the method to save data in stack data structure type?
What is wrong with this statement? Myname = 'robin';
Can we declare variables anywhere in c?
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 are the advantages and disadvantages of a heap?
What is operator promotion?
How do you declare a variable that will hold string values?
What are the rules for the identifier?
what is the height of tree if leaf node is at level 3. please explain
What are the functions to open and close the file in c language?
How will you delete a node in DLL?
What oops means?
What is the meaning of 2d in c?