i understand longest subsequence.. but what is longest increasing
subsequence .. i dont know the difference between them..plz sumbody tel ..
On Tue, Aug 9, 2011 at 9:41 AM, Akash Mukherjee akash...@gmail.com wrote:
@udit : thanx man...they were really helpful
2 allcan u plzz chk d
hello reynald
could you plz send me the Thoughtworks questions,
thanx
On Aug 4, 6:17 am, Reynald Suz reynaldsus...@gmail.com wrote:
Thank you so much! Thoughtworks is visiting our campus on Aug-8, I'll send
you questions for sure.
On Wed, Aug 3, 2011 at 11:14 PM, coder dumca
10
4 5
2 7 6 11
1 39 8 12 13 14 15
i think we should first find the parent of the particular node ..then apply
the concept as told by Brijesh on it
p =parent(q);
r = parent(p);
like u have given array
*1 2 3 4 5 7* 6 7 8 9 *1 2 3 4 5 6 *5 4 3 6 7 8
ans will be 6
On Wed, Aug 10, 2011 at 11:30 AM, Anika Jain anika.jai...@gmail.com wrote:
i understand longest subsequence.. but what is longest increasing
subsequence .. i dont know the difference between them..plz
We can use min heap.
1) Build a Min Heap MH of the first m elements (arr[0] to arr[m-1]) of
the given array. O(m)
2) For each element, after the mth element (arr[m] to arr[n-1]),
compare it with root of MH.
a) If the element is greater than the root then make it root and call
heapify for MH
b)
any body tell the test cases??
--
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
algogeeks+unsubscr...@googlegroups.com.
For more
okk thanx
On Wed, Aug 10, 2011 at 11:58 AM, sagar pareek sagarpar...@gmail.comwrote:
like u have given array
*1 2 3 4 5 7* 6 7 8 9 *1 2 3 4 5 6 *5 4 3 6 7 8
ans will be 6
On Wed, Aug 10, 2011 at 11:30 AM, Anika Jain anika.jai...@gmail.comwrote:
i understand longest subsequence.. but
Don solution is perfect.
i double checked it..
On Aug 9, 9:01 pm, Don dondod...@gmail.com wrote:
tree closestSharedAncestor(tree root, tree node1, tree node2, int
result)
{
tree returnValue = 0;
if (root)
{
if (root == node1) result += 1;
if (root == node2) result += 2;
As Nitin Metioned Selection Algorithm is the best for this problem.
Order of complexity is O(n)
On Aug 9, 11:31 pm, Ankuj Gupta ankuj2...@gmail.com wrote:
We can use min heap.
1) Build a Min Heap MH of the first m elements (arr[0] to arr[m-1]) of
the given array. O(m)
2) For each element,
3
eee
cjpvbhntzgm
aeiouaeiouae
vfghjklwerf
eouaeioicou
On Wed, Aug 10, 2011 at 12:06 PM, kartik sachan kartik.sac...@gmail.comwrote:
any body tell the test cases??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
inp:
3
eee
vfghjklwerf
out:
cjpvbhntzgm
aeiouaeiouae
eouaeioicou
On Wed, Aug 10, 2011 at 12:40 PM, Nitin Nizhawan
nitin.nizha...@gmail.comwrote:
3
eee
cjpvbhntzgm
aeiouaeiouae
vfghjklwerf
eouaeioicou
On Wed, Aug 10, 2011 at 12:06 PM, kartik
thanks nitin got AC...:) silliy mistake
--
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
algogeeks+unsubscr...@googlegroups.com.
For
nice logic :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/-rdIH5FKbk8J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe
Agree with mohit goel..
On Wed, Aug 10, 2011 at 11:22 AM, Mohit Goel mohitgoel291...@gmail.comwrote:
10
4 5
2 7 6 11
1 39 8 12 13 14 15
i think we should first find the parent
Hi
if anyone recently faced written or interview of those companies then pls
discuss here
Thanks in advance
--
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
apply BFS
the node after the particular node(whode cousin to be find) will be the
required node
On Wed, Aug 10, 2011 at 2:15 PM, Puneet Chawla puneetchawla...@gmail.comwrote:
Agree with mohit goel..
On Wed, Aug 10, 2011 at 11:22 AM, Mohit Goel mohitgoel291...@gmail.comwrote:
please share algorithm for interviews book as the link mentioned in
algogeeks post does not work anymore.
On Jul 26, 3:34 pm, coder dumca coder.du...@gmail.com wrote:
@ Raghvendra thanks dude
On Mon, Jul 25, 2011 at 7:20 PM, raghavendhra rahul
rahulraghavend...@gmail.com wrote:
hi
Please anyone
On Wed, Aug 10, 2011 at 2:19 PM, sagar pareek sagarpar...@gmail.com wrote:
Hi
if anyone recently faced written or interview of those companies then pls
discuss here
Thanks in advance
--
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD
--
is it 101/200??
On Wed, Aug 10, 2011 at 3:41 AM, Prakash D cegprak...@gmail.com wrote:
is there anything like there should be atleast one man and one women should
dance together?
On Wed, Aug 10, 2011 at 2:26 AM, Shuaib Khan aries.shu...@gmail.comwrote:
On Wed, Aug 10, 2011 at 1:45 AM,
@coder dumca: If u apply DFS u will get a brother and not cousin. And yes
it works only for some cases.
*Muthuraj R
IV th Year , ISE
PESIT , Bangalore*
On Wed, Aug 10, 2011 at 2:24 PM, coder dumca coder.du...@gmail.com wrote:
apply BFS
the node after the particular node(whode cousin to be
@Mohit : in ur code u are breaking out when there parent reaches root. But
not every time will we have to reach root. For example: Leftmost right
cousin of 1 is 9...in dat case parent should stop at 4. which is not the
root.
*Muthuraj R
IV th Year , ISE
PESIT , Bangalore*
On Wed, Aug 10, 2011
is it 100 men 100 women?
On Wed, Aug 10, 2011 at 3:25 PM, programming love
love.for.programm...@gmail.com wrote:
is it 101/200??
On Wed, Aug 10, 2011 at 3:41 AM, Prakash D cegprak...@gmail.com wrote:
is there anything like there should be atleast one man and one women
should dance
@sagar and @brijesh: awesome explanation!!! too good! 1 doubt!
the question says it has only 28 leaves. According to uour explanations, it
has 81 leaves. how is it possible??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
@muthu raj:
it will also come out ,when loop condition will not be statisfied.i.e when
'p' is not the right child of its parent...in such a case it will not reach
root ..
in the ex given by u it will stop at 4 .
--
You received this message because you are subscribed to the Google Groups
can someone predict the output and give an explanation
main()
{
int i=5;
printf(%d %d %d %d %d,i++,i--,++i,--i,i);
}
--
*Rajeshwar Patra,*
*MCA final year,*
*Nit Durgapur*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
depends on the compiler to compiler
Thank you,
Siddharam
On Wed, Aug 10, 2011 at 3:53 PM, Rajeshwar Patra
rajeshwarpa...@gmail.comwrote:
can someone predict the output and give an explanation
main()
{
int i=5;
printf(%d %d %d %d %d,i++,i--,++i,--i,i);
}
--
*Rajeshwar Patra,*
can anybody explain how its printing
4 5 5 4 5
--
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
@siddarth:
should not the statement you mentioned above as
nodeptr h = (nodeptr*)malloc(sizeof(nodeptr*));
be
nodeptr h =(struct*)malloc(sizeof(struct)); ??
cos malloc returns pointer to memory block and nodeptr itself is a pointer
and you have used nodeptr* further?
On Tue, Aug 9, 2011 at
the evaluation of parameters in printf() done from right to left.
Thank you,
Siddharam
On Wed, Aug 10, 2011 at 4:04 PM, Anubhav Aggarwal
experience...@gmail.comwrote:
can anybody explain how its printing
4 5 5 4 5
--
You received this message because you are subscribed to the Google
@jiten: that staement means pa is a pointer to 3 ints not an array of
pointers.. int *pa[3] means it is an array of pointers
On Fri, Aug 5, 2011 at 8:44 PM, Jiten j.playe...@gmail.com wrote:
(*pa)[3] ;// pa is array of pointers to int type;
so pa = arr; doesn't make any sense ,bcoz arr
AFAIK evalution order of parameters in c is compiler dependent.
On Wed, Aug 10, 2011 at 4:09 PM, siddharam suresh
siddharam@gmail.com wrote:
the evaluation of parameters in printf() done from right to left.
Thank you,
Siddharam
On Wed, Aug 10, 2011 at 4:04 PM, Anubhav Aggarwal
@sandeep: so the statement becomes if(ch=0) since printf returns integer
0...whats does this mean now actually?0 is ascii for NULL and so ch is
assinged to null? I am slightly confused..
On Tue, Aug 9, 2011 at 7:04 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
@all sorry i give wrong
It could have a maximum of 81 leaves with the same '40' no of internal
nodes so for any value between 28 to 81, it would have only 40 internal
nodes
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
thank u , i couldnot have answered this :P
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/Gppo1P-Gr9oJ.
To post to this group, send email to
Excatly
why dont u just make a rough diagram in paper for binary and ternary trees
and just see that each level has max of 2/3^i where 2/3 is for
binary/ternary tree and i is level where root level is 0...
then make a complete ternary tree and see why leaves with 28 in numbers have
I have a vector of stuct, how to sort this vector?
problem is I can't overload the '' operator in struct definition, as i want
to sort by 'x' one time, and then by 'y'. I tried to write the comparator
function separatley but its no working. How to do it?
#includeiostream
#includealgorithm
May be this way We dont display de title of a movie as a thumbnail
So may be the first frame which has a wide distribution of
colours , assuring it has some other part of de clip other than de
title.. Ignore this if it sounds funny...!!
On 8/9/11, *$* gopi.komand...@gmail.com wrote:
what is comp in your code?
On Wed, Aug 10, 2011 at 6:19 PM, aanchal goyal goyal.aanch...@gmail.comwrote:
I have a vector of stuct, how to sort this vector?
problem is I can't overload the '' operator in struct definition, as i
want to sort by 'x' one time, and then by 'y'. I tried to write
Hi,
I know that the compiled code of a C file(after assembler converts assembly
code to opcode) cannot be run on a different OS or it cannot be run on a
different processor architecture.
So, I need to know what are the machine dependencies which are added in
object file.
One thing is the opcode
sorry, comp is either comp_x or comp_y
On Wed, Aug 10, 2011 at 6:24 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote:
what is comp in your code?
On Wed, Aug 10, 2011 at 6:19 PM, aanchal goyal
goyal.aanch...@gmail.comwrote:
I have a vector of stuct, how to sort this vector?
problem is I
what is the best book for aptitude questions?
Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering
--
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
rs aggarwal
On 10 August 2011 18:32, Shashank Jain shashan...@gmail.com wrote:
what is the best book for aptitude questions?
Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering
--
You received this message because you are subscribed to the Google Groups
got it.
On Wed, Aug 10, 2011 at 6:31 PM, aanchal goyal goyal.aanch...@gmail.comwrote:
sorry, comp is either comp_x or comp_y
On Wed, Aug 10, 2011 at 6:24 PM, Nitin Nizhawan
nitin.nizha...@gmail.comwrote:
what is comp in your code?
On Wed, Aug 10, 2011 at 6:19 PM, aanchal goyal
@Sagar
See at level 4, 81 leaf nodes are possible, since in question it has been
given 28 leaf nodes, if i use just 10 nodes from level 3 (27 nodes), i can
get 28 leaves, but if u observe the remaining 17 nodes in the 3rd level are
also becoming leaf nodes, but in question given as 28 leaf
bool operator()(point a, point b){
return a.xb.x;
}
remove references it should work. following is working code.
#includeiostream
#includealgorithm
#includevector
using namespace std;
typedef struct
{
int x;
int y;
}point;
struct comp_x
{
bool operator()(point a, point b){
instead of struct you can use *pairint,int* which will make the work
easier for you
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Wed, Aug 10, 2011 at 6:47 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote:
bool operator()(point a, point b){
is it like a number base problem? where a set of alpha is (0,1,2),
and the n is the lenght of number
such as
(p,n) 3 (0,1) of length 3
so the value is (000)(001)(010)...
On 8月10日, 下午9时19分, Amethy hobby news...@gmail.com wrote:
I thought the backtracking is the method to solve this problem
@ram got it. tanx :)
--
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
algogeeks+unsubscr...@googlegroups.com.
For more options,
ya ur right!!!
On 10 August 2011 18:44, vamshi vijay vamshi1...@gmail.com wrote:
@Sagar
See at level 4, 81 leaf nodes are possible, since in question it has been
given 28 leaf nodes, if i use just 10 nodes from level 3 (27 nodes), i can
get 28 leaves, but if u observe the remaining 17
@ankit: does that mean that after the compiler is informed that the void
pointer will point to integer witht he typecast statement and then we point
it to some other type , it will be an error?
i mean after that typecast statement, if i do
char a;
k=a;is it wrng?
On Tue, Aug 9, 2011 at 2:06
gr8 work vamshi
but total nodes will be
1+3+9+27+*2*(not 1)=42
On Wed, Aug 10, 2011 at 6:59 PM, Pratz mary pratima.m...@gmail.com wrote:
ya ur right!!!
On 10 August 2011 18:44, vamshi vijay vamshi1...@gmail.com wrote:
@Sagar
See at level 4, 81 leaf nodes are possible, since in
@sagar: Thanks again :) But my doubt is it'll have more than 28 leaf nodes
when the ques clearly sayd it shud have 28 leaf nodes.
@vamshi: I kind of agree with what you say.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
the evalution starts from right to left bt gets printed from left to right
On 10 August 2011 16:14, Naveen Kumar naveenkumarve...@gmail.com wrote:
AFAIK evalution order of parameters in c is compiler dependent.
On Wed, Aug 10, 2011 at 4:09 PM, siddharam suresh
siddharam@gmail.com wrote:
Answer 2) To prevent use of NULL with any other variable instead of 0(zero),
it is set at void pointer.
for ex, you cannot use in C like this, a=b+NULL;
but, i think, in C++ you can do.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view
I am just increasing the size of the current string by one. So that a
new character can be appended.
On Sat, Aug 6, 2011 at 11:01 AM, Tushar Bindal tushicom...@gmail.com wrote:
@gaurav
didn't get this:
Just to increase the size of the string by one.
Then you can put any character at the the
@Nikhil: There is no way to tell how many nodes the ternary tree has.
After all, a ternary tree with one leaf node can contain any number of
nodes.
Dave
On Aug 9, 1:37 pm, NIKHIL nikhil.jain.shali...@gmail.com wrote:
In a ternary Tree No of leaves 28. How many nodes it have?
An AVL tree with
Its completely compiler dependent.
Actually it depends upon how the printf has been implemented.
Generally its a stack based implementation which will give you
4 5 5 5 5
as output.
It was interesting to see your output, have you executed it ? Which compiler
?
On 10 August 2011 19:05, Pratz
make two ropes 50m and 100 meter. make a loop kind of thing with that now
you have two 50 mtr ropes so get down to 100 mtr point and tie loop rope in
downward now cut the loop at 100 mtr you have 100 mtr rope then move down
with the help of that. i hope i am clear.
On Mon, Aug 8, 2011 at 1:52 PM,
can someone explain how this works-
*
*
*void* *main*(){
*int* a,b,d;
scanf(%d%d,a,b);
d=a+~b+1;
printf(%d,d);
getch();
}
say if a=5 b=6 then
output is -1
if ~ is one's complement operator
then
a=0101
~b=1001
d= 0101+1001+1. which is not -1
can someone explain how it works.
calculate 0101+1001+1 as
Now if the signed numbers are represented using 2's complement system
then is the representation for -1
On Aug 10, 7:23 pm, Ayswarya Srinivasan krsayswa...@gmail.com wrote:
can someone explain how this works-
*
*
*void* *main*(){
*int* a,b,d;
int depth(node *root)
{
return root ? max(depth(root-left), depth(root-right)) : 0;
}
On Aug 8, 8:03 am, jagrati verma jagrativermamn...@gmail.com wrote:
finding the depth or height of a tree.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
int depth(node *root)
{
return root ? 1+max(depth(root-left), depth(root-right)) : 0;
}
On Aug 8, 8:03 am, jagrati verma jagrativermamn...@gmail.com wrote:
finding the depth or height of a tree.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
@Ayswarya: In twos-complement arithmetic, -x = ~x + 1, so
a + ~b + 1 = a +(~b +1) = a + (-b) = a - b.
Dave
On Aug 10, 9:23 am, Ayswarya Srinivasan krsayswa...@gmail.com wrote:
can someone explain how this works-
*
*
*void* *main*(){
*int* a,b,d;
scanf(%d%d,a,b);
d=a+~b+1;
@Don: Beautiful!
Dave
On Aug 10, 10:03 am, Don dondod...@gmail.com wrote:
int depth(node *root)
{
return root ? 1+max(depth(root-left), depth(root-right)) : 0;
}
On Aug 8, 8:03 am, jagrati verma jagrativermamn...@gmail.com wrote:
finding the depth or height of a tree.
--
You
thank you dave and amit...
On Wed, Aug 10, 2011 at 8:36 PM, Dave dave_and_da...@juno.com wrote:
@Ayswarya: In twos-complement arithmetic, -x = ~x + 1, so
a + ~b + 1 = a +(~b +1) = a + (-b) = a - b.
Dave
On Aug 10, 9:23 am, Ayswarya Srinivasan krsayswa...@gmail.com wrote:
can someone
I do love functions that start with return.
Don
On Aug 10, 10:09 am, Dave dave_and_da...@juno.com wrote:
@Don: Beautiful!
Dave
On Aug 10, 10:03 am, Don dondod...@gmail.com wrote:
int depth(node *root)
{
return root ? 1+max(depth(root-left), depth(root-right)) : 0;
}
On Aug 8,
@Ankit Sambyal: Agree with ankuj...TC of your solution is O(nlogn) and not
O(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 algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
@Ankuj: +1 for different approach. (Though selection algo is more efficient
than this.)
On Wed, Aug 10, 2011 at 1:44 PM, nick tarunguptaa...@gmail.com wrote:
nice logic :)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
Write a program to find the empirical formulae from physical formulae
ex: ch3((oh)2(nh3)2)5
has empirical formulae
c1 h43 o2 n10
--
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.
@kunal, anuj : step 2 of my algo takes O(n^2). So how can the TC be O(nlogn)
--
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
@Ankit: Ohh Sorry..I didnt actually read the question properly..
I didnt see we have to check for sum which must be another element in the
array not some user provided constant value..I mis-understood it with sum
upto k problem which can be solved on sorted array in O(n)...
thats why gave a wrong
what's the book name plz?
Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering
On Wed, Aug 10, 2011 at 6:41 PM, Pratz mary pratima.m...@gmail.com wrote:
rs aggarwal
On 10 August 2011 18:32, Shashank Jain shashan...@gmail.com wrote:
what is the best book for
Hi reynald can u plz post the questions u got..
On Aug 4, 6:17 am, Reynald Suz reynaldsus...@gmail.com wrote:
Thank you so much! Thoughtworks is visiting our campus on Aug-8, I'll send
you questions for sure.
On Wed, Aug 3, 2011 at 11:14 PM, coder dumca coder.du...@gmail.com wrote:
**http://www.jbigdeal.com/2010/08/r-s-agarwal-quantitative-aptitude-e.htmlQuantitative
Apptitude By R S Agarwal
On Wed, Aug 10, 2011 at 10:49 PM, Shashank Jain shashan...@gmail.comwrote:
what's the book name plz?
Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering
main()
{
int m,n;
m=3+max(2,3);
n=2*max(3,2);
printf(“%d,%d”,m,n);
}
ans:-m=2,n=3
why output is this???
--
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
this ques has been answered be4 on this grp...and u missed the macro
definition as welljst a few days bak...search the group
On Wed, Aug 10, 2011 at 11:00 PM, rohit rajuljain...@gmail.com wrote:
main()
{
int m,n;
m=3+max(2,3);
n=2*max(3,2);
printf(“%d,%d”,m,n);
}
ans:-m=2,n=3
why
is your interview over???
On Aug 9, 11:31 pm, nandy nandhini.scor...@gmail.com wrote:
Hi all,does anyone know EMC software's(bangalore) written pattern?is
it purely technical..if so can anyone tell me the areas to concentrate
on?
--
You received this message because you are subscribed to the
is it sufficient or do we need to refer to any other books?
On Wed, Aug 10, 2011 at 10:59 PM, rajoo king without sing
rajoo...@gmail.com wrote:
**http://www.jbigdeal.com/2010/08/r-s-agarwal-quantitative-aptitude-e.htmlQuantitative
Apptitude By R S Agarwal
On Wed, Aug 10, 2011 at 10:49 PM,
Tie the rope at the top of the tower
Climb down with the help of the rope up to 100 mt peg possItion
Tie the rope to that peg, Climb up to the top of the tower with that rope.
Now release the rope at the top and hold it. It ll take you down.:P
On Wed, Aug 10, 2011 at 7:49 PM, varun pahwa
Q1)Two linked Lists are given,i.e,their head pointers are given,and the
problem is to check if the second one is reverse of the first one.Give the
most efficient algo for it.
Q2)A linked list is given,and one of its nodes is given.The problem is to
delete the given node from the linked list.(The
for first reverse one of the link list by changing the pointer and
than traverse one from backward and compare it the the other.
for second. keep copying data from the next node to the node to be
delete and remove the tail. This will not work if node to be deleted
is the last node.
On Wed, Aug
@naveen
for the first one,how will u traverse the list backwards..
I didnt understand your second solution,since the head is not given so how
can u go from a node to the node to be deleted..
I forgot that in the first one,we are not allowed to use extra memory.
Also do please mention the time
can anyone please post the questions asked in goldman sachs this year
--
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
reverse the list inplace and compare the two list element by element
On Thu, Aug 11, 2011 at 12:01 AM, Piyush Kapoor pkjee2...@gmail.com wrote:
@naveen
for the first one,how will u traverse the list backwards..
I didnt understand your second solution,since the head is not given so how
can u
+1 to deepika.
On Thu, Aug 11, 2011 at 12:10 AM, deepikaanand swinyanand...@gmail.comwrote:
can anyone please post the questions asked in goldman sachs this year
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/dV-k5A2L7PkJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this
Ques 1:
Let l1 and l2 be the 2 lists.
Step 1 : Reverse l1 O(n)
Step 2 : Compare l1 and l2 by comparing each node and traversing
ahead.--O(n)
Step 3: Reverse l1 -O(n)
Ques 2:
Let cur be the node of the linked list which is to be
and for second no need to delete that very node pointer, take the data
of the node next to the node you want to delete and copy that to the
node you want to delete, do it for all next nodes. delete the last
node.
On Thu, Aug 11, 2011 at 12:12 AM, sukran dhawan sukrandha...@gmail.com wrote:
please help me !
On Wed, Aug 10, 2011 at 11:20 PM, sukran dhawan sukrandha...@gmail.comwrote:
is it sufficient or do we need to refer to any other books?
On Wed, Aug 10, 2011 at 10:59 PM, rajoo king without sing
rajoo...@gmail.com wrote:
hey...is your written test over...plz share the questions dude...!! plz..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/PWtdOw902rIJ.
To post to this
1)similar to list palindrome problem(soln already there in net)
2)it has discussed 2 day before on same group. please search once
Thank you,
Siddharam
On Thu, Aug 11, 2011 at 12:01 AM, Piyush Kapoor pkjee2...@gmail.com wrote:
@naveen
for the first one,how will u traverse the list backwards..
Yeah...please share questions..it will be of a lot help!
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/cs4XYfgJrooJ.
To post to this group, send email to
how to find the mirror image of a binary tree ?
--
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
It's an UNDEFINED BEHAVIOR .
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/sydSwA_UuWQJ.
To post to this group, send email to algogeeks@googlegroups.com.
at each node swap left right pointers
On Thu, Aug 11, 2011 at 12:25 AM, sukran dhawan sukrandha...@gmail.com wrote:
how to find the mirror image of a binary tree ?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
thanks all
On Thu, Aug 11, 2011 at 12:21 AM, siddharam suresh
siddharam@gmail.comwrote:
1)similar to list palindrome problem(soln already there in net)
2)it has discussed 2 day before on same group. please search once
Thank you,
Siddharam
On Thu, Aug 11, 2011 at 12:01 AM, Piyush
i think the given formula's solution should be
c1 h33 o20 n10
check the question..
On Wed, Aug 10, 2011 at 9:49 PM, vikas mehta...@gmail.com wrote:
Write a program to find the empirical formulae from physical formulae
ex: ch3((oh)2(nh3)2)5
has empirical formulae
c1 h43 o2 n10
--
You
+1.. it'll be helpful
On Thu, Aug 11, 2011 at 12:12 AM, Prashant Gupta
prashantatn...@gmail.comwrote:
+1 to deepika.
On Thu, Aug 11, 2011 at 12:10 AM, deepikaanand swinyanand...@gmail.comwrote:
can anyone please post the questions asked in goldman sachs this year
--
You received this
void mirror(struct node* node)
{
if (node==NULL)
{
return;
}
else
{
struct node* temp;
mirror(node-left);
mirror(node-right);
temp = node-left;
node-left = node-right;
node-right = temp;
}
}
--
You received this message because you are subscribed to the
1)for the fst one you dont have to reverse the linked list just traverse the
linked list recursively and read it from back .
correct me if m wrong !
On Thu, Aug 11, 2011 at 12:41 AM, Piyush Kapoor pkjee2...@gmail.com wrote:
thanks all
On Thu, Aug 11, 2011 at 12:21 AM, siddharam suresh
1 - 100 of 111 matches
Mail list logo