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
Define decoding or deserialization?
What happen if we install flow meter with orifice plate, but bevel position is in upstream and not in downstream
How to calculate ESI Please define what include in basic salary and what should be excluded from basic salary
What are 3d transforms in css3?
how you can reset Magento file & Directory permissions?
How do I start laravel in ubuntu?
whate is the meaning of balance/unbalance,in stabilizers type
Explain the categorization of SAP Business object client tools?
what is oracle database ? : Sql dba
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Can you define udf?
Does godaddy support drupal?
i am working with OC 4.5 i have numbers in table in 10 row with some null values please tell me how to find total? Thanks
What is page window?