10 multiple choice questions on C : very easy , Kanetkar will suffice.
Aptitude : subjective , with mostly mathematical puzzles . Lengthy due to
time consuming problems. Focus on accuracy .Series completion, Time speed
distance,permutation and combination is what i can recall in the aptitude
ans is 12, but instead of counting i am looking for some better solution.
On Tue, Aug 23, 2011 at 10:48 PM, manish patel manispatel...@gmail.comwrote:
(24,33),(12,66),(8,99),(6,132),(4,198),(3,254),(2,396),(1,792),(792,1),(72,11),(264,3),(33,24)
On Tue, Aug 23, 2011 at 10:18 PM, Aman Goyal
Can anyone suggests a good data structure for n-ary tree.. where n is the
input by the user...
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group,
{
struct TreeNode * nextSibling;
struct TreeNode * fistChild;
//rest things
}
On Aug 6, 4:10 pm, Aman Goyal aman.goya...@gmail.com wrote:
Can anyone suggests a good data structure for n-ary tree.. where n is the
input by the user...
--
You received this message because you are subscribed
.. pseudo code for finding inorder successor of a node without parent
field..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
as an eg.
let ab be the string, and 3 characters length string is wht is expected..
a - -
b - -
a a -
a b -
b a -
b b -
a a a
a a b
a b a
a b b
b a a
b a b
b b a
b b b
On Fri, Aug 5, 2011 at 12:49 PM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:
The basic idea is that for every
physical address i suppose...
On Fri, Aug 5, 2011 at 1:09 PM, anurag anurag19aggar...@gmail.com wrote:
What will be the output.
int i=5;
printf(%u,i);
What it will print:
i. 5
ii. Base address of the memory
iii. Physical address
iv. Logical address
--
You received this message
How to find the largest BST in a binary tree.
15
/ \
10__ 20
/ \
5 _7
/ \
2_ __5
/ \/
0 8 3
The largest BST (may or may not include all of its descendants) from the
above example should be:
15
/ \
_10 20
/
5
Please do not post working code, logic/algorithm or
* Nearest Common Ancestor*
Given a rooted tree of size * n *. You receive a series of online queries :
* Give nearest common ancestor of u,v *. Your objective is to preprocess
the tree in * O(n) * time to get a data structure of size * O(n) * so that
you can answer any such query in * O(log n)
multiple auxiliary queues
and keep track of their heights.
What say?
On 5 August 2011 09:40, Aman Goyal aman.goya...@gmail.com wrote:
Yes, that can be a liable case definitely!!!
On Fri, Aug 5, 2011 at 9:35 AM, Dipankar Patro dip10c...@gmail.comwrote:
The question is a bit tricky
@sagar : I m confused of how that can be done..
could u elaborate
On Fri, Aug 5, 2011 at 10:00 AM, Aman Goyal aman.goya...@gmail.com wrote:
while dequing a node from the queue, how will u check whether a bst
property is sattisfied or not ?..
On Fri, Aug 5, 2011 at 9:49 AM, Dipankar Patro
thats the *'largest BST in a binary tree.'*
Thank you,
Siddharam
On Fri, Aug 5, 2011 at 10:00 AM, Aman Goyal aman.goya...@gmail.comwrote:
while dequing a node from the queue, how will u check whether a bst
property is sattisfied or not ?..
On Fri, Aug 5, 2011 at 9:49 AM, Dipankar Patro
You are given two height balanced binary search trees T and T', storing m
and n elements respectively. Every element of tree T is smaller than every
element of tree T'. Every node u also stores height of the subtree rooted at
it. Using this extra information how can you merge the two trees in time
thanks gaurav !
On Fri, Aug 5, 2011 at 9:45 AM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:
On Fri, Aug 5, 2011 at 9:41 AM, Aman Goyal aman.goya...@gmail.com wrote:
You receive a series of online queries : Give nearest common ancestor of
u,v . Your objective is to preprocess the tree
#include‹stdio.h›
main()
{
struct xx
{
int x;
struct yy
{
char s;
struct xx *p;
};
struct yy *q;
};
}
ouput: compiler error.
Any logical reasons?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
c(n,2) * c(n,2)
On Wed, Jul 27, 2011 at 11:07 PM, siva viknesh sivavikne...@gmail.comwrote:
No. rectangles in NxN matrix
... is it n^2 + (n-2) ??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
yes this will be the case.
On Wed, Jul 27, 2011 at 11:35 PM, Puneet Gautam puneet.nsi...@gmail.comwrote:
@nikhil:So what u mean is that if i have:
struct{
int a;
char b[5];
};
the size of this struct's node will be 12 not 9.., to make it a multiple of
4??
On 7/26/11, Nikhil Gupta
(C(n+1,2))* (C(n+1,2))
choosing any two rows from n+1 rows, and any two columns from n+1 columns
will yield a rectangle .
So solution is the no of possible combinations.
On Wed, Jul 27, 2011 at 11:23 PM, Abhinav Arora
abhinavdgr8b...@gmail.comwrote:
It will be (1+2+3+,,,+n)^2.u can verify
I think it is kind of illegal to use it, cos i tried this code on gcc
compiler oof ubuntu(code b) and the result is infinite loop, which doesnt go
with our logic at all.
On Thu, Jul 21, 2011 at 5:45 PM, karthiga m karthichandr...@gmail.comwrote:
no it is legal only... its working
On
they start shooting the person standing next to their neighbour
On Thu, Jul 21, 2011 at 4:38 PM, Vivek Srivastava
srivastava.vivek1...@gmail.com wrote:
No,That is not the sequence?As I said 'I' will kill '3' as 3 is next to i's
neighbour.
On Thu, Jul 21, 2011 at 4:16 PM, SAMMM
Please specify the format of the date..!
On Thu, Jul 21, 2011 at 3:28 PM, Radhika Renganathan
radi.coo...@gmail.comwrote:
Write test cases for a program which finds the next palindromic date given
a date.
--
radhika ..
--
You received this message because you are subscribed to the
My mistake, i forgot to initiate x.
Sorry for the mistake. But for devc it is infinite, then should we ignore
that?
On Thu, Jul 21, 2011 at 7:40 PM, poised dip10c...@gmail.com wrote:
Both the codes work perfectly on Ubuntu 11.04. (gcc)
first code gives 0 in output.
second one doesn't give
@ankit gupta: superb solutn
On Thu, Jul 21, 2011 at 8:09 PM, SkRiPt KiDdIe anuragmsi...@gmail.comwrote:
To get complete 32 bit inverse :
x=((x1)0x) | ((x1)0x);
x=((x2)0x) | ((x2)0x);
x=((x4)0x0F0F0F0F) | ((x4)0xF0F0F0F0);
Solutn:
1101000
Start from rightmost bit-leftmost bit
Find the starting and ending 1’s positions, here 3 and 7
If any 0 bw them… while traversing.. (bitwise r-l).. make it 1 and other
adjacent right ” 1” as “0”. And this is your new no. here 111
If you find no “0” in bw ( eg for
210 for the last one you posted
On Sat, Jul 9, 2011 at 4:33 PM, amit the cool amitthecoo...@gmail.comwrote:
6,24,60,120,_
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To
may be by checking the server logs !!
On Fri, Jul 8, 2011 at 11:48 AM, Vishal Thanki vishaltha...@gmail.comwrote:
google this question!!
On Fri, Jul 8, 2011 at 11:47 AM, priyanshu priyanshuro...@gmail.com
wrote:
How to find the number users connected to the web??
--
You received
Algo:
1 3 77 78 90
2 5 79 81
compare 1 2 =1
compare 3 2 =2 and call binary search on 2nd array widot 2 to identify a
proper position for 3 and place it there.
now arrays
1 2 77 78 90
3 5 79 81
3 and 77= swap + binary
compare 3 and 77, swap them
find position of 77 in second array and place
Now let x be the answer we want, the number of drops required.
So if the first egg breaks maximum we can have x-1 drops and so we must
always put the first egg from height x. So we have determined that for a
given x we must drop the first ball from x height. And now if the first drop
of the first
) time in worst case.
On Fri, Jul 8, 2011 at 2:40 PM, Aman Goyal aman.goya...@gmail.com wrote:
Algo:
1 3 77 78 90
2 5 79 81
compare 1 2 =1
compare 3 2 =2 and call binary search on 2nd array widot 2 to identify a
proper position for 3 and place it there.
now arrays
1 2 77 78 90
3 5 79
Go for crack the interview.
On Fri, Jul 1, 2011 at 9:06 AM, Antony Kotre antonyko...@gmail.com wrote:
please suggest me or mail me a good interview questions ebook
thanks
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
http://www.studyshare.in/share/content.php?195
I have received a apple shuffle few days back with just liking a facebook
video. I am still boggled, but I want all of you earn it.
Yes, this may sound spam, but it is a real story. pre Congrats for an
ipod/tshirt/mug who are going to 'like' this
go on www.studyshare.in .. if u click 'like' on SECOND LAST video you can
win a lucky draw with prizes such as t-shirts and mugs even ipods, provided
u have given correct address at your facebook account.
IT IS NOT SPAM. you can really experience it.
--
You received this message because you are
this code will work only for this test case, it is wrong for all
cases...eg3 4 9 8 6 7 10
there will be -1 output for 8 and 9 which is actually wrong..
On Tue, Feb 1, 2011 at 6:01 PM, Veenus Gupta smartvee...@gmail.com wrote:
#define N 7
int main()
{
int a[N]={1,3,5,7,6,4,8};
we can create a height balanced tree with all nodes having their value and
also their index value.. can be done in o(n)
then we need to look to d right side of the node and check for index(greater
).. which will be o(log(n))
correct me if i m wrong..
On Tue, Feb 1, 2011 at 7:50 PM, Aman Goyal
(extensible in size)
On Wed, Mar 24, 2010 at 2:42 AM, aman goyal aman...@gmail.com wrote:
why do we use malloc funtcn to allocate memory for a stuct node variable
pointer..
why dont we simply write struct node p;
instead we do
struct node *p
p=malloc();
any valid reasons
why do we use malloc funtcn to allocate memory for a stuct node variable
pointer..
why dont we simply write struct node p;
instead we do
struct node *p
p=malloc();
any valid reasons for this??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
36 matches
Mail list logo