Answer Posted / savitha
c++ is object oriented programming language... it has special functions such as class, polymorphism ,inheritance ,encapsulation , data abstraction...hence we can develop programs which relates to objects makes us easy to understand
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
Combinations of fibanocci prime series
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
List out few of the applications that make use of Multilinked Structures?
What is scanf () in c?
How can I recover the file name given an open stream or file descriptor?
Is null always equal to 0(zero)?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What is pointer to pointer in c language?
What is the size of enum in bytes?
What is sizeof in c?
What is 'bus error'?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
how to construct a simulator keeping the logical boolean gates in c
How do you print only part of a string?
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