Is class is a abstract datatype in java?
please explain every phase in the "SDLC" in the dotnet.
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
Why do we need Python Directories
How safe is website on wordpress?
Where do I find the admin panel on facebook?
How can I write a function analogous to scanf?
Which programming language's unsatisfactory performance led to the discovery of c++?
What are connections In R?
Tell me how do you debug a program in python? Is it possible to step through python code?
How can variables be characterized?
How to write php code in laravel blade?
Which is the best c++ compiler for beginners?
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
Is objective c superset of c?