@mithun: Try
A = 1, 6
B = 4, 3
A ^ B = 0.
Alone Ex-OR cant solve this in O(n) time.
On Monday, 21 May 2012 21:48:30 UTC+5:30, mithun wrote:
By doing Ex-OR we can find if b is permutation of A
suppose a -- 3 5 4
b -- 4 3 5
if A ^ B = 0 then both are permutation or else
I think it might done using function of following prototype:
void func(node* root, dequeint d, const dequeint::iterator it);
I will add left child's value in it-1 if exists else create new...
similarly for right child.
and call the same function for each of the children to explore
further..
ALGO:
1. For each element 1 to k:
insert in into min-heap
2. for each element k+1 to n
delete the root of min-heap and insert this item into the min-
heap
3. Finally you have a min-heap of k largest numbers and the root is
your answer
COMPLEXITY: O(n logn)
-Monish
On Sep 3, 3:03
If I correctly understood the question, It says:
1. 0= x[i] =1 for all i and for all x of line i.
2. y[i]y[i+1] means lines have positive slope
If line i is f(x,y): A[i]x + B[i]y -C[i], Use the following concept:
1. Find 1 line closest to the given point such that f(x,y) is of same
sign for both
What level of questions for each- english, aptitute, coding? Can you
discuss some?
-Monish
On Aug 5, 10:22 pm, parag khanna khanna.para...@gmail.com wrote:
half an hour Aptitude test , after that half an hour written test , then
Technical rounds (2-3) and then HR
profile Software dev - 6
What level of questions for each- english, aptitute, coding? Can you
discuss some?
-Monish
On Aug 17, 5:06 pm, Anika Jain anika.jai...@gmail.com wrote:
there will be 15 english fill in the blanks, 5 series questn, 10 aptitude
questions, 10 logical questions..
then 10 c++ mcqs and 5 coding
;
if(root-data == data1)
*status |= 1;
if(root-data == data2)
*status |= 2;
return ans;
}
Full Program here:
https://github.com/monish001/CPP-Programs/blob/master/General/LeastCommonAncestor.c
Program tested on Dev-CPP
-
Monish
On Aug 9, 7:56 pm, Raman raman.u...@gmail.com wrote:
Can anyone give
In which college akamai coming?
-Monish
On Aug 11, 11:01 am, naveen ms naveenms...@gmail.com wrote:
hey can any1 help me out...how ll be the akamai recruiment
procedure...and if u have any akamai papers please upload it
with regards
naveen
--
You received this message because you are
Program:
int arr[] = {12, 14, 15, 23, 45};
printf(%u %u\n, arr, arr);
Question: Why arr == arr ?
Comments:
1. arr is a variable that stores the address of location where arr[0]
resides. Complier shows arr and arr having same value. Shouldn't arr
be the address where arr resides?
Thanks
Monish
Given : ddbbccae
O/P : 2d4a2b2c1a1e
What is happening? What algo?
Thanks and regards
Monish
On Aug 9, 5:59 pm, ankit sambyal ankitsamb...@gmail.com wrote:
Given an array of characters, change the array to something as shown in the
following example.
Given : ddbbccae
O/P :
10 matches
Mail list logo