[algogeeks] INMOBI

2011-08-22 Thread priya ramesh
guys plz post inmobi's recruitment experience! -- 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.

Re: [algogeeks] Re: Given an array, find out whether there exists a triplet which can form sides of triangle.

2011-08-22 Thread Raghavan
A[0] = 10A[1] = 2A[2] = 5 A[3] = 1A[4] = 8A[5] = 20 Triplet 10,5,8 is triangular. Dave, do your solution do it? On Tue, Aug 23, 2011 at 11:55 AM, Amol Sharma wrote: > +1 for dave's solution.i will also do the same > -- > > > Amol Sharma > Third Year Student > Computer Sci

Re: [algogeeks] Re: Given an array, find out whether there exists a triplet which can form sides of triangle.

2011-08-22 Thread Amol Sharma
+1 for dave's solution.i will also do the same -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Tue,

Re: [algogeeks] Re: C-question

2011-08-22 Thread Vijay Khandar
Thanks ...got it.. On Tue, Aug 23, 2011 at 11:30 AM, binayakranjan das wrote: > In this case = has right to left associativity and as such < has no > associativity.but,the parsing occurs from left to right.so first (x is checked which evaluates to 0 then (0 that is what is assigned to i

Re: [algogeeks] C-question

2011-08-22 Thread Vijay Khandar
Thank,,,Now got it. On Tue, Aug 23, 2011 at 11:22 AM, nagarajan wrote: > Hi Vijay, > > i = 10 < 10 < 5 > > => 0 < 5 > > => 1 > > On Tue, Aug 23, 2011 at 11:03 AM, Vijay Khandar > wrote: > >> main() >> { >> int x=10,y=10,z=5; >> int i=x> pf("\n%d",i); >> >> } >> o/p is 1 .pls any1 explain me

[algogeeks] Re: Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given)

2011-08-22 Thread Dave
Given today's pipelined arithmetic units and optimizing compilers, Horner's rule may not be the fastest way to evaluate the polynomial, because it only executes one addition or multiplication at a time, in sequential order. Rearranging the polynomial may give more opportunities for parallelism, and

[algogeeks] Re: C-question

2011-08-22 Thread binayakranjan das
In this case = has right to left associativity and as such < has no associativity.but,the parsing occurs from left to right.so first (x wrote: > main() > { > int x=10,y=10,z=5; > int i=x pf("\n%d",i); > > } > > o/p is 1 .pls any1 explain me hw is it printing? -- You received this message because

[algogeeks] Re: Given an array, find out whether there exists a triplet which can form sides of triangle.

2011-08-22 Thread Dave
@Saurabh: If you can use O(n) extra space, make a copy of the array and sort it: O(n log n). Then, if there is a solution, there will be a solution of the form (a[i], a[i+1], a[i+2]), where 0 <= i < n-2, which can be checked with a simple for loop: O(n). Thus, the complexity is O(n log n). Dave

Re: [algogeeks] C-question

2011-08-22 Thread nagarajan
Hi Vijay, i = 10 < 10 < 5 => 0 < 5 => 1 On Tue, Aug 23, 2011 at 11:03 AM, Vijay Khandar wrote: > main() > { > int x=10,y=10,z=5; > int i=x pf("\n%d",i); > > } > o/p is 1 .pls any1 explain me hw is it printing? > > -- > You received this message because you are subscribed to the Google Groups >

Re: [algogeeks] Re: C dot

2011-08-22 Thread siddharam suresh
how much they are offering ? Thank you, Siddharam On Tue, Aug 23, 2011 at 11:12 AM, ranjith kumar wrote: > > > They shortlist candidates based on cgpa and select the highest cgpa > candidate. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" g

Re: [algogeeks] Re: C dot

2011-08-22 Thread ranjith kumar
They shortlist candidates based on cgpa and select the highest cgpa candidate. -- 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 alg

[algogeeks] C-question

2011-08-22 Thread Vijay Khandar
main() { int x=10,y=10,z=5; int i=xhttp://groups.google.com/group/algogeeks?hl=en.

[algogeeks] Given an array, find out whether there exists a triplet which can form sides of triangle.

2011-08-22 Thread saurabh agrawal
Given an array, find out whether there exists a triplet which can form sides of triangle. You are not allowed to modify the array. PLease dont give o(n^3) solution there exists a solution with nlog(n) i think -- You received this message because you are subscribed to the Google Groups "Algorit

Re: [algogeeks] Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given)

2011-08-22 Thread SAMM
horner's rule On 8/23/11, saurabh agrawal wrote: > Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given) > > -- > 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 unsubscri

Re: [algogeeks] Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given)

2011-08-22 Thread aditya kumar
(x(x(b+x(c+dx On Tue, Aug 23, 2011 at 10:21 AM, saurabh agrawal wrote: > Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given) > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googleg

[algogeeks] Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given)

2011-08-22 Thread saurabh agrawal
Compute a+bx2+cx3+dx4+... efficiently (a,b,c...given) -- 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...@google

Re: [algogeeks] Re: Concept of Pointer

2011-08-22 Thread Sanjay Rajpal
+1 to ADITI. Sanju :) On Mon, Aug 22, 2011 at 2:51 PM, Ashish Sachdeva wrote: > for the 1st printf i hv this explanation: > precedence of ++ is greater then * ... but associativity of both of > them is right to left... > thats why dereferenced takes place 1st and then the pointer is > incr

Re: [algogeeks] C output

2011-08-22 Thread sukran dhawan
its 10 On Tue, Aug 23, 2011 at 12:03 AM, rohit wrote: > #include > > #define max(a,b) (a>b?a:b) > > > int main() > { > > int j=max(3+2,2+8); > printf("%d",j); > >return 0; > } > >why this program show output as 9 ? please help me > > -- > You received this message because you are su

Re: [algogeeks] Re: Search an array of unknown length

2011-08-22 Thread saurabh singh
Just a small code to back up my point... http://www.ideone.com/woRiT On Tue, Aug 23, 2011 at 7:33 AM, saurabh singh wrote: > That would take all the fun awaywhat if you are given only the address > of the array?This wont work in that case > > > On Mon, Aug 22, 2011 at 10:39 PM, asdqwe wrote

Re: [algogeeks] Re: Search an array of unknown length

2011-08-22 Thread saurabh singh
That would take all the fun awaywhat if you are given only the address of the array?This wont work in that case On Mon, Aug 22, 2011 at 10:39 PM, asdqwe wrote: > If i am not wrong, the only possible solution can be > len=sizeof(arr)/sizeof(arr[0]) > i.e. find the length from the array itself

[algogeeks] "Strange Billboard" of Judge Spoj

2011-08-22 Thread Victor Manuel Grijalva Altamirano
I am trying the problem http://www.spoj.pl/problems/CERC07B/ and http://www.spoj.pl/problems/DFLOOR/ but i don´t have idea how to solve, anyone can help me??? -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- You received this message because you are subscribed to

Re: [algogeeks] Re: print all paths which sum up to a value.

2011-08-22 Thread Anil Arya
I'm very sry dude..It was not me as any intelligent person can understand. On Tue, Aug 23, 2011 at 3:49 AM, Anil Arya wrote: > fuck > > > On Mon, Aug 22, 2011 at 12:52 AM, Dhriti Khanna wrote: > >> void search_path( root , int i ) >> { >>static char str[100]; >>if(root == nul

Re: [algogeeks] Re: print all paths which sum up to a value.

2011-08-22 Thread Anil Arya
fuck On Mon, Aug 22, 2011 at 12:52 AM, Dhriti Khanna wrote: > void search_path( root , int i ) > { >static char str[100]; >if(root == null) > return; > >if( i == 0 ) > str[i] = root->data; > >else str[i] = str[i-1] + root->data; // Maintaining t

Re: [algogeeks] thanx...

2011-08-22 Thread Anil Arya
f 2011/8/22 A for ♥ღAakasHღ♥ > > it was done in 4 rounds >> >> written >> 1. aptitude: containing data interpretation and logical reasoning >> >> 2.technical: 20 ques from c/c++ basicaly frm pointers..., 5 ques from OS >> and 5 ques from ds.. >> >> interview >> 3.technical: question frm c basic

Re: [algogeeks] Microsoft :)

2011-08-22 Thread Anil Arya
@harshal congo dude.: On Mon, Aug 22, 2011 at 10:07 PM, ghsjgl k wrote: > @Harshal > > > congratulations > > can u tell me if u know any other help full links regarding placements > > > > On Mon, Aug 22, 2011 at 12:39 AM, Ankur Garg wrote: > >> @Harsha >> >> Bro I am unable to r

[algogeeks] Re: Concept of Pointer

2011-08-22 Thread Ashish Sachdeva
for the 1st printf i hv this explanation: precedence of ++ is greater then * ... but associativity of both of them is right to left... thats why dereferenced takes place 1st and then the pointer is incremented... rest is fine... correct me if i m wrong... On Aug 22, 3:47 pm, aditi garg wrote:

[algogeeks] Re: Longest palindrome

2011-08-22 Thread icy`
sorry, I meant to joke about (0.5 * n^2) ;P On Aug 22, 4:46 pm, "icy`" wrote: > brute force...    http://codepad.org/D07BNo91    There are some > checks to  help reduce O(n^2),  so I want to say..  O(1.5n) ?    =) > > #output for str = 'abaccddccefe' > #ccddcc 6 > > #for str = 'abraxyzarba' > #

[algogeeks] Re: Longest palindrome

2011-08-22 Thread icy`
brute force...http://codepad.org/D07BNo91 There are some checks to help reduce O(n^2), so I want to say.. O(1.5n) ?=) #output for str = 'abaccddccefe' #ccddcc 6 #for str = 'abraxyzarba' #a 1 On Aug 22, 1:09 pm, uma wrote: > can yo tell exactly , how the suffix tree is used for f

Re: [algogeeks] C output

2011-08-22 Thread code pool
10 as 3+2>2+8?3+2:2+8 5>10?5:10 ' + ' has more precedence then ?: as well as > s o/p is 10.. correct me if i am wrong. On Tue, Aug 23, 2011 at 12:50 AM, gmagog...@gmail.com wrote: > output is 10 using gcc 4.5.2 > > Yanan Cao > > > > On Mon, Aug 22, 2011 at 2:18 PM, sagar pareek wrote: > >> Ye

Re: [algogeeks] constructor ques

2011-08-22 Thread JAIDEV YADAV
yeah D first ... On Mon, Aug 22, 2011 at 10:53 PM, sagar pareek wrote: > +1 coder > > > On Mon, Aug 22, 2011 at 9:41 PM, sukran dhawan wrote: > >> hey sorry didnt notice virtual :) >> >> >> On Mon, Aug 22, 2011 at 9:38 PM, coder dumca wrote: >> >>> @sukran ur r wrong man >>> the construdor of vir

[algogeeks] shortest path

2011-08-22 Thread cegprakash
i'm trying to solve this spoj problem SHPATH / TSHPATH i'm sure that my algorithm is correct i'm getting Runtime error (SIGABRT) again and again i've posted my code here http://ideone.com/O1qu3 help pls.. -- You received this message because you are subscribed to the Google Groups "Algorithm G

Re: [algogeeks] Re: question on fork()

2011-08-22 Thread gmagog...@gmail.com
Infinite times Yanan Cao On Mon, Aug 22, 2011 at 2:43 PM, Don wrote: > // DO NOT RUN THIS! By inspection, how many times will it print "Hello > world"? > // If you find out by running it, that is cheating. Don't do it! > int main() > { > int i=0, j=0; > for(i = 0; i*j < 20; ++i) > { >if

Re: [algogeeks] Re: question on fork()

2011-08-22 Thread gmagog...@gmail.com
I am getting 6 red and 8 green as expected using the original code Yanan Cao On Mon, Aug 22, 2011 at 2:38 PM, Yasir wrote: > Surprisingly, if I comment the last if condition ( which is AFTER red() > call ), it is printing red only 6 times as expected.. > http://ideone.com/XMHzC > > main() > {

[algogeeks] Re: question on fork()

2011-08-22 Thread Don
// DO NOT RUN THIS! By inspection, how many times will it print "Hello world"? // If you find out by running it, that is cheating. Don't do it! int main() { int i=0, j=0; for(i = 0; i*j < 20; ++i) { if (fork() > 0) ++j; else i = j = 0; printf("Hello world\n"); } return 0; }

[algogeeks] Re: question on fork()

2011-08-22 Thread Yasir
Surprisingly, if I comment the last if condition ( which is AFTER red() call ), it is printing red only 6 times as expected.. http://ideone.com/XMHzC main() { fork(); int color=fork(); if(color==0) fork(); red(); //if(color==0) // fork

Re: [algogeeks] Re:

2011-08-22 Thread Sanjay Rajpal
It might give a run time error because q contains a garbage value, when we do q+j, this address may belong to some other process. Since memory of a process is protected from others, it may give a run time error. Sanju :) On Mon, Aug 22, 2011 at 11:56 AM, sagar pareek wrote: > it gives runtime

Re: [algogeeks] Re:

2011-08-22 Thread code pool
@ahishek i was thinking the same and even from one pdf i have read this but it s showing error..confused.. On Tue, Aug 23, 2011 at 12:26 AM, sagar pareek wrote: > it gives runtime error... > coz u have to allocate memory to *q > > On Tue, Aug 23, 2011 at 12:02 AM, Abhishek > wrote: > >> i think.

Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread Sanjay Rajpal
Stephen Prata C++ Primer Plus . Sanju :) On Mon, Aug 22, 2011 at 9:08 AM, sukran dhawan wrote: > which is the best book for c++ ? complete reference or prata or c++ by > stroustroup? > > On Mon, Aug 22, 2011 at 11:40 AM, Sanjay Rajpal wrote: > >> Here concept of v-tables comes into picture

Re: [algogeeks] C output

2011-08-22 Thread gmagog...@gmail.com
output is 10 using gcc 4.5.2 Yanan Cao On Mon, Aug 22, 2011 at 2:18 PM, sagar pareek wrote: > Yeah its o/p is 10 :) > > > On Tue, Aug 23, 2011 at 12:45 AM, Deepak Garg wrote: > >> its output is >> >> 10 >> >> >> On Tue, Aug 23, 2011 at 12:03 AM, rohit wrote: >> >>> #include >>> >>> #define m

Re: [algogeeks] C output

2011-08-22 Thread sagar pareek
Yeah its o/p is 10 :) On Tue, Aug 23, 2011 at 12:45 AM, Deepak Garg wrote: > its output is > > 10 > > > On Tue, Aug 23, 2011 at 12:03 AM, rohit wrote: > >> #include >> >> #define max(a,b) (a>b?a:b) >> >> >> int main() >> { >> >> int j=max(3+2,2+8); >> printf("%d",j); >> >>return 0; >> } >>

Re: [algogeeks] C output

2011-08-22 Thread Deepak Garg
its output is 10 On Tue, Aug 23, 2011 at 12:03 AM, rohit wrote: > #include > > #define max(a,b) (a>b?a:b) > > > int main() > { > > int j=max(3+2,2+8); > printf("%d",j); > >return 0; > } > >why this program show output as 9 ? please help me > > -- > You received this message becaus

[algogeeks] binary tree ques

2011-08-22 Thread Coder Coder
Print the coordinates of nodes of a binary tree. eg. A BC D EF G A(3,2) B(1,1) C(5,1) D(0,0) E(2,0) F(4,0) G(6,0) *Snehil Saxena NIT Warangal 3rd yr* -- You received this message because you are subscribed to the Goo

Re: [algogeeks] Re:

2011-08-22 Thread sagar pareek
it gives runtime error... coz u have to allocate memory to *q On Tue, Aug 23, 2011 at 12:02 AM, Abhishek wrote: > i think.. it will not produce error, but o/p 'may' be garbage values. > since the memory locations adjacent to *q will be overwritten. > > -- > You received this message because you

[algogeeks] C output

2011-08-22 Thread rohit
#include #define max(a,b) (a>b?a:b) int main() { int j=max(3+2,2+8); printf("%d",j); return 0; } why this program show output as 9 ? please help me -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, sen

[algogeeks] Re:

2011-08-22 Thread Abhishek
i think.. it will not produce error, but o/p 'may' be garbage values. since the memory locations adjacent to *q will be overwritten. -- 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.goog

[algogeeks]

2011-08-22 Thread code pool
main( ) { char *q; int j; for (j=0; j<3; j++) scanf("%s" ,(q+j)); for (j=0; j<3; j++) printf("%c" ,*(q+j)); for (j=0; j<3; j++) printf("%s" ,(q+j)); } Will the program give some o/p or error ??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group

Re: [algogeeks] amazon

2011-08-22 Thread Jagannath Prasad Das
In formal arguments compiler comes to know about the type of its arguments. In the actual parameter compiler also knows what is the type of parameter passed. Actually the type conversion takes place when the function is called at the runtime during assignment of actual to formal argument. So when

[algogeeks] Re: amazon question

2011-08-22 Thread Ankuj Gupta
But the o/p at http://ideone.com/zKZuS seems to be different than what one is getting from parent child tree On Aug 8, 10:41 am, Kamakshii Aggarwal wrote: > what will be the o/p of the following program: > > main() > { > int ret; > ret=fork(); > ret=fork(); > ret=fork(); > ret=fork(); > > if(!r

[algogeeks] Re: question on fork()

2011-08-22 Thread Ankuj Gupta
I am getting 6 calls to red and 8 calls to green when i built parent child tree but when i ran this code http://ideone.com/UBaBB I got 10 calls to red and 10 calls to green. Can some explain this ? On Aug 22, 9:31 pm, ghsjgl k wrote: > i saw this question in one of DREAM companies > > i dont kn

Re: [algogeeks] Please share experiences if any body has faced Samsung Engineering Labs(SIEL)

2011-08-22 Thread sagar pareek
one more thing simple questions on OS in interview very basic like what is process? diff b/w process and threads why thread call light process ... On Mon, Aug 22, 2011 at 11:15 PM, sonu kumar wrote: > aptitude test as sagar said.then tech test consists of > c- 20 ques, > ds-5 ques, > os- 5 ques.

Re: [algogeeks] Please share experiences if any body has faced Samsung Engineering Labs(SIEL)

2011-08-22 Thread sonu kumar
aptitude test as sagar said.then tech test consists of c- 20 ques, ds-5 ques, os- 5 ques. then in interview only c and c++,and ds asked. they mostly emphasize on code 2 write. On Mon, Aug 22, 2011 at 2:08 PM, saurabh wrote: > Can Please tell about the type of question if any body has faced > S

Re: [algogeeks] Mentor Graphics Help !!

2011-08-22 Thread Ankur Garg
Also to add, If you post profile in their portal no reply comes...How to apply ...can any one here refer my candidature for Mentor Graphics ..I have 2 yrs work ex working with IBM ISL Regards Ankur On Mon, Aug 22, 2011 at 7:23 PM, Mangal Dass wrote: > Anybody pls tell me the questions coming in

Re: [algogeeks] Output question

2011-08-22 Thread Abhishek
+1 to sagar. @vartika: if you don't know the concept of Union then understanding this program will be quite lenghty, because it will involve lot of calculation. try to check some simple examples, like: union a { int a; char c; }; int main() { union a xy; xy.a=65; printf("%c",xy.c)

Re: [algogeeks] constructor ques

2011-08-22 Thread sagar pareek
+1 coder On Mon, Aug 22, 2011 at 9:41 PM, sukran dhawan wrote: > hey sorry didnt notice virtual :) > > > On Mon, Aug 22, 2011 at 9:38 PM, coder dumca wrote: > >> @sukran ur r wrong man >> the construdor of virtual base class are called first otherwise it is >> from left to right >> so the correc

Re: [algogeeks] Please share experiences if any body has faced Samsung Engineering Labs(SIEL)

2011-08-22 Thread sagar pareek
50 apti (25 DI + 25 reasoning) in 60 mis 20 tech 30 mins 1tech + 1 hr and u are done On Mon, Aug 22, 2011 at 9:36 PM, ghsjgl k wrote: > i attended for SISO > > > On Mon, Aug 22, 2011 at 2:08 PM, saurabh wrote: > >> Can Please tell about the type of question if any body has faced >> SIEL

[algogeeks] Re: Longest palindrome

2011-08-22 Thread uma
can yo tell exactly , how the suffix tree is used for finding palindromes? On Aug 22, 3:58 am, WgpShashank wrote: > Hey Geeks I think question can be solved by many ways . some of the > algorithms are i have implemented & aware of are -> > > 1st. Algo >  Generate all palindromes (even & odd lengt

[algogeeks] Re: Search an array of unknown length

2011-08-22 Thread asdqwe
If i am not wrong, the only possible solution can be len=sizeof(arr)/sizeof(arr[0]) i.e. find the length from the array itself. On Aug 22, 9:01 pm, saurabh singh wrote: > @dave or anyone??? response please > > > > > > > > > > On Sun, Aug 21, 2011 at 12:43 PM, saurabh singh wrote: > > kkk...

Re: [algogeeks] Output question

2011-08-22 Thread sagar pareek
U should know that union's elements share memory alloted through the largest data type like in this case 10 bytes is alloted and is shared by all the union elements. So in union x :- last element modified is c, so that's why it is printing garbage values for int and char[] elements... actually if

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
if u dont want messages pl unsubscribe from the group :) On Mon, Aug 22, 2011 at 10:26 PM, raj Kumar wrote: > please dont send me messages > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeek

Re: [algogeeks] amazon

2011-08-22 Thread raj Kumar
please dont send me messages -- 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 opti

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
when u pass a string as a argument only the starting address is passed not the complete string.so char n[] is converted to char *n On Mon, Aug 22, 2011 at 10:14 PM, Ashima . wrote: > can anyone explain wy these 2 will be different ,atleast wen they are > passed as actual or formal parameters. >

Re: [algogeeks] amazon

2011-08-22 Thread Ashima .
can anyone explain wy these 2 will be different ,atleast wen they are passed as actual or formal parameters. As in case of actual parameters, both will be passed as "n"--> some address value. In case of formal parameters,char n[] takes the form of char*n. So where is the difference highlighted in

Re: [algogeeks] Re: Longest palindrome

2011-08-22 Thread coder dumca
@ harry how it is possible man On Mon, Aug 22, 2011 at 3:58 AM, WgpShashank wrote: > Hey Geeks I think question can be solved by many ways . some of the > algorithms are i have implemented & aware of are -> > > 1st. Algo > Generate all palindromes (even & odd length ) of given string while keep

Re: [algogeeks] Microsoft :)

2011-08-22 Thread ghsjgl k
@Harshal congratulations can u tell me if u know any other help full links regarding placements On Mon, Aug 22, 2011 at 12:39 AM, Ankur Garg wrote: > @Harsha > > Bro I am unable to read ur blog ..It says this > > http://harshal-theone.blogspot.com/ > > It doesn't look like you have been invi

Re: [algogeeks] Important

2011-08-22 Thread coder dumca
hi manglu On Mon, Aug 22, 2011 at 7:05 AM, Mangal Dass wrote: > Anybody pls tell me the questions coming into Information-Mosaic campus > test. > Mosaic has changed its pattern. > Pls post both the pattern as well as questions(if something u remembered) . > > Thanks a lot, > > -- > You received t

Re: [algogeeks] Re: amazon q

2011-08-22 Thread sagar pareek
@shashank what about min heap? Check this out --> http://en.wikipedia.org/wiki/Heap_%28data_structure%29 On Mon, Aug 22, 2011 at 4:13 PM, WgpShashank wrote: > Only Balanced BST (its guaranteed that we can search element in o(logn) , > > i am assuming its maxheap .In a max heap, the smallest eleme

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread Ashima .
Since its not a Linked list, so get middle value from "top" pop till middle element and push elements in a new stack. again push the elemetns back to original stack,except for the middle element. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Aug 22, 2011 at 8:49 P

Re: [algogeeks] question on fork()

2011-08-22 Thread ghsjgl k
i saw this question in one of DREAM companies i dont know the answer On Mon, Aug 22, 2011 at 11:43 AM, dexter does wrote: > void red() > { > > } > void green() > { > > } > main() > { > fork(); > int color=fork(); > if(color==0) > fork(); > red(); >

Re: [algogeeks] Syllogism

2011-08-22 Thread ghsjgl k
Yes, the conclusion is true u have no need to re think i recently studied things related to syllogism in Logical and Analytical reasoning from Arihant publications On Sat, Aug 20, 2011 at 10:26 AM, geek_one wrote: > Statement: Some girls are beautiful. > Conclusion: Some girls are not bea

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
take the size of char * p and char p [] to confirm the same On Mon, Aug 22, 2011 at 9:32 PM, Anand Prasad wrote: > yea,, true.. spot on actually.. > Anand > > > > On Mon, Aug 22, 2011 at 9:30 PM, sukran dhawan wrote: > >> they are different !!! char p[] is a constant pointer and char * p is not.

Re: [algogeeks] constructor ques

2011-08-22 Thread sukran dhawan
hey sorry didnt notice virtual :) On Mon, Aug 22, 2011 at 9:38 PM, coder dumca wrote: > @sukran ur r wrong man > the construdor of virtual base class are called first otherwise it is from > left to right > so the correct order is > D A B C Z > On Mon, Aug 22, 2011 at 8:25 AM, Sanjay Rajpal wro

Re: [algogeeks] Please share experiences if any body has faced Samsung Engineering Labs(SIEL)

2011-08-22 Thread ghsjgl k
i attended for SISO On Mon, Aug 22, 2011 at 2:08 PM, saurabh wrote: > Can Please tell about the type of question if any body has faced > SIEL . > > Saurabh sah > NIT Jaipur. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To pos

Re: [algogeeks] constructor ques

2011-08-22 Thread coder dumca
@sukran ur r wrong man the construdor of virtual base class are called first otherwise it is from left to right so the correct order is D A B C Z On Mon, Aug 22, 2011 at 8:25 AM, Sanjay Rajpal wrote: > agree with sukran. > > > Sanju > :) > > > > On Mon, Aug 22, 2011 at 8:20 AM, sukran dhawan wr

Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread sukran dhawan
which is the best book for c++ ? complete reference or prata or c++ by stroustroup? On Mon, Aug 22, 2011 at 11:40 AM, Sanjay Rajpal wrote: > Here concept of v-tables comes into picture. Refer to C++ Primer Plus by > Stephen Prata. > > > Sanju > :) > > > > On Sun, Aug 21, 2011 at 11:05 PM, JAIDEV

Re: [algogeeks] amazon

2011-08-22 Thread Anand Prasad
yea,, true.. spot on actually.. Anand On Mon, Aug 22, 2011 at 9:30 PM, sukran dhawan wrote: > they are different !!! char p[] is a constant pointer and char * p is not. > u can do something like this > > char * p; > p="dgdfg"; > > but not the same for char p[] > > On Mon, Aug 22, 2011 at 8:55 PM

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
they are different !!! char p[] is a constant pointer and char * p is not. u can do something like this char * p; p="dgdfg"; but not the same for char p[] On Mon, Aug 22, 2011 at 8:55 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > The compiler will distinguish between char n[] and

Re: [algogeeks] Re: Search an array of unknown length

2011-08-22 Thread saurabh singh
@dave or anyone??? response please On Sun, Aug 21, 2011 at 12:43 PM, saurabh singh wrote: > kkk...not sure > assume no number is greater than 1000(I mentioned There has to be some > additional constraints to make the problem solvable) > Now check 1st element if not the desired element ke

Re: [algogeeks] amazon

2011-08-22 Thread priya ramesh
even i thought it's both. Plz correct me if i'm wrong folks! -- 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...

Re: [algogeeks] amazon

2011-08-22 Thread Anand Prasad
answer's both right? they're interchangeable either way,..? Anand On Mon, Aug 22, 2011 at 9:21 PM, sukran dhawan wrote: > which college has amazon come? > > > On Mon, Aug 22, 2011 at 9:18 PM, Avi Bhandari wrote: > >> >> >> On Mon, Aug 22, 2011 at 9:16 PM, sukran dhawan wrote: >> >>> when it is

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
which college has amazon come? On Mon, Aug 22, 2011 at 9:18 PM, Avi Bhandari wrote: > > > On Mon, Aug 22, 2011 at 9:16 PM, sukran dhawan wrote: > >> when it is passed to functions both forms are interchangeable.single >> subscripted array is converted to pointer >> >> On Mon, Aug 22, 2011 at 9:1

Re: [algogeeks] amazon

2011-08-22 Thread Avi Bhandari
On Mon, Aug 22, 2011 at 9:16 PM, sukran dhawan wrote: > when it is passed to functions both forms are interchangeable.single > subscripted array is converted to pointer > > On Mon, Aug 22, 2011 at 9:14 PM, sukran dhawan wrote: > >> a >> >> >> On Mon, Aug 22, 2011 at 8:55 PM, priya ramesh < >> love

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
when it is passed to functions both forms are interchangeable.single subscripted array is converted to pointer On Mon, Aug 22, 2011 at 9:14 PM, sukran dhawan wrote: > a > > > On Mon, Aug 22, 2011 at 8:55 PM, priya ramesh < > love.for.programm...@gmail.com> wrote: > >> The compiler will distinguis

Re: [algogeeks] amazon

2011-08-22 Thread sukran dhawan
a On Mon, Aug 22, 2011 at 8:55 PM, priya ramesh < love.for.programm...@gmail.com> wrote: > The compiler will distinguish between char n[] and char * in which part of > the prog?? > 1. In actual parameters of function arguments > 2. In formal parameters of function arguments > 3. in both > > gener

[algogeeks] amazon

2011-08-22 Thread priya ramesh
The compiler will distinguish between char n[] and char * in which part of the prog?? 1. In actual parameters of function arguments 2. In formal parameters of function arguments 3. in both generally after 1st online technical round what is the cut off for amazon?? -- You received this message be

Re: [algogeeks] constructor ques

2011-08-22 Thread Sanjay Rajpal
agree with sukran. Sanju :) On Mon, Aug 22, 2011 at 8:20 AM, sukran dhawan wrote: > its left to right always ! > > > On Mon, Aug 22, 2011 at 8:49 PM, Sanjay Rajpal wrote: > >> A >> B >> C >> D >> >> >> Sanju >> :) >> >> >> >> On Mon, Aug 22, 2011 at 8:17 AM, sivaviknesh s wrote: >> >>> you

Re: [algogeeks] constructor ques

2011-08-22 Thread sukran dhawan
its left to right always ! On Mon, Aug 22, 2011 at 8:49 PM, Sanjay Rajpal wrote: > A > B > C > D > > > Sanju > :) > > > > On Mon, Aug 22, 2011 at 8:17 AM, sivaviknesh s wrote: > >> you have 4 classes A,B,C,D and class Z is derived from all these classes >> using >> Class Z: public A,private B,Pr

Re: [algogeeks] constructor ques

2011-08-22 Thread Sanjay Rajpal
Z at last. Sanju :) On Mon, Aug 22, 2011 at 8:19 AM, Sanjay Rajpal wrote: > A > B > C > D > > > Sanju > :) > > > > On Mon, Aug 22, 2011 at 8:17 AM, sivaviknesh s wrote: > >> you have 4 classes A,B,C,D and class Z is derived from all these classes >> using >> Class Z: public A,private B,Prot

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread *$*
Hi, How about the following approach. lets take stack is stack1. lets take 2 pointers , p1 and p2 for every pop , keep increment p1 , so that p1 will point to latest pop'ed out element. increment p2 for every odd count of pop's... increment p2 , for 1 , 3 , 5 , pop'ings etc.. so at the end , p2

Re: [algogeeks] constructor ques

2011-08-22 Thread Sanjay Rajpal
A B C D Sanju :) On Mon, Aug 22, 2011 at 8:17 AM, sivaviknesh s wrote: > you have 4 classes A,B,C,D and class Z is derived from all these classes > using > Class Z: public A,private B,Protected C, Virtual D > What is the order of constructor call? > > ...plz reason out also > > -- > Regards,

[algogeeks] constructor ques

2011-08-22 Thread sivaviknesh s
you have 4 classes A,B,C,D and class Z is derived from all these classes using Class Z: public A,private B,Protected C, Virtual D What is the order of constructor call? ...plz reason out also -- Regards, $iva -- You received this message because you are subscribed to the Google Groups "Algori

Re: [algogeeks] Re: Process memory Layout

2011-08-22 Thread sukran dhawan
its a run time error(segmentation fault). it is placed in a read only memory On Mon, Aug 22, 2011 at 3:05 PM, aditi garg wrote: > @ kumar > if we hav > char *p="hello world"; > p[5]= 'a'; > it generates only run time error and not compile time error > > > On Mon, Aug 22, 2011 at 10:47 AM, kumar

Re: [algogeeks] c programe explain

2011-08-22 Thread sukran dhawan
output is Interview On Sun, Aug 21, 2011 at 10:53 PM, Sanjay Rajpal wrote: > the o/p wil be Interview. > > > > Sanju > :) > > > > On Sun, Aug 21, 2011 at 10:20 AM, SuDhir mIsHra > wrote: > >> funct(char* str) >> { >> printf("%s\n",str); >> } >> main() >> { >> static int ii = 1; >>

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread muthu raj
Sorry i dint read the question properly :) *Muthuraj R IV th Year , ISE PESIT , Bangalore* On Mon, Aug 22, 2011 at 7:24 AM, sukran dhawan wrote: > count is required since its not implemented as LL > > > On Mon, Aug 22, 2011 at 7:47 PM, shady wrote: > >> i wish u had read the question... it is

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread sukran dhawan
count is required since its not implemented as LL On Mon, Aug 22, 2011 at 7:47 PM, shady wrote: > i wish u had read the question... it is simple.. push to new stack and then > pop back... number of elements count need to be there > > > On Mon, Aug 22, 2011 at 7:44 PM, muthu raj wrote: > >> No n

Re: [algogeeks] AMAZON

2011-08-22 Thread shady
no, search the archives thread closed *** On Mon, Aug 22, 2011 at 7:35 PM, venkateswari srinivasan < srinivasanvenkatesw...@gmail.com> wrote: > can any post the soft copy of cracking the coding interview book > > -- > You received this message because you are subscribed to th

Re: [algogeeks] AMAZON

2011-08-22 Thread venkateswari srinivasan
can any post the soft copy of cracking the coding interview book -- 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+uns

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread muthu raj
No need to count the number of nodes. Since its implemented as a linked list traverse the list with two two pointers one incremented one node next and other incremented two nodes next simultaneously. void delete_MiddleStack(node **h) { if(*h==NULL) return; node *p,*q; p=*h; q

[algogeeks] Important

2011-08-22 Thread Mangal Dass
Anybody pls tell me the questions coming into Information-Mosaic campus test. Mosaic has changed its pattern. Pls post both the pattern as well as questions(if something u remembered) . Thanks a lot, -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread shady
i wish u had read the question... it is simple.. push to new stack and then pop back... number of elements count need to be there On Mon, Aug 22, 2011 at 7:44 PM, muthu raj wrote: > No need to count the number of nodes. Since its implemented as a linked > list traverse the list with two two poin

Re: [algogeeks] Mentor Graphics Help !!

2011-08-22 Thread Mangal Dass
Anybody pls tell me the questions coming into Information-Mosaic campus test. Pls tell me both the pattern as well as questions whatever u r remembered. Thanks a lot, On 8/22/11, sourabh jakhar wrote: > i also want to know abt the off campus recruitment of mentor graphics > On Mon, Aug 22, 2011

  1   2   >