[algogeeks] Least Common Ancestor in STL MAP

2013-03-21 Thread Avinash
Given a STL map, say mapint, bool m1. Given two value a b that may or may not exists in m1. Find the Least Common Ancestor in STL MAP. Remember you don't have access to root, so you need to iterate using iterator. Use the methods/function of MAP forex begin, end, find etc. Solution should be

Re: [algogeeks] Flipkart test

2012-10-11 Thread Avinash Mishra
.* On Tue, Oct 9, 2012 at 9:47 AM, Avinash Mishra mishra.avinas...@gmail.comwrote: Hello any one have idea about Flipkart recruitment process for SDE1. Please guide me what to prepare. Thanks -- regard's Avinash -- You received this message because you are subscribed

[algogeeks] Flipkart test

2012-10-09 Thread Avinash Mishra
Hello any one have idea about Flipkart recruitment process for SDE1. Please guide me what to prepare. Thanks -- regard's Avinash -- 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

Re: [algogeeks] Re: Microsoft online questions : DLL to bst??

2012-08-05 Thread Avinash Mishra
. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- aviNash -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Binomial Coefficients

2012-07-31 Thread Avinash Mishra
this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- aviNash -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] directi paper pattern

2012-07-31 Thread Avinash Mishra
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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With Regard's Avinash -- You

Re: [algogeeks] directi paper pattern

2012-07-31 Thread Avinash Mishra
/-/2YdFa0ZwOIsJ. 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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- With regard's Avinash -- You received

Re: [algogeeks] adobe aptitude test

2012-07-28 Thread Avinash Mishra
this group at http://groups.google.com/group/algogeeks?hl=en. -- With Regard's Avinash Mishra -- 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

Re: [algogeeks] Directi Written Q 2012

2012-07-24 Thread Avinash Mishra
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, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- aviNash -- You received this message because

Re: [algogeeks] 3 sum problem

2012-07-22 Thread Avinash Mishra
://groups.google.com/group/algogeeks?hl=en. -- aviNash -- 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

[algogeeks] Re: Largest Path in Tree [SPOJ BENFECT]

2012-06-23 Thread Avinash
Some how I found that we need to run bfs twice to get the largest distance between any two nodes of a tree. Please explain me how it works. regards, avinash -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web

Re: [algogeeks] Re: Largest Path in Tree [SPOJ BENFECT]

2012-06-23 Thread Avinash Jain
at 2:44 PM, Avinash jain.av...@gmail.com wrote: Some how I found that we need to run bfs twice to get the largest distance between any two nodes of a tree. Please explain me how it works. regards, avinash -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: Largest Path in Tree [SPOJ BENFECT]

2012-06-23 Thread Avinash Jain
5 / \ \ 6 7 8 / \ \ 9 a b so from a-b is a-7-4-2-5-8-b On Sat, Jun 23, 2012 at 2:44 PM, Avinash jain.av...@gmail.com wrote: Some how I found that we need to run bfs twice to get the largest distance between any two nodes of a tree. Please explain me how it works

[algogeeks] Scanf in an infinite loop

2011-09-13 Thread Avinash Dharan
#include stdio.h void main() { while(1) { int opt; scanf(%d,opt); printf(%d\n,opt); } } when i execute this program, if i give a character instead of an integer, it goes into an infinite loop. why is it so? -- You received this message because you are

Re: [algogeeks] Amazon - Interview Qn

2011-08-30 Thread Avinash Dharan
That would work dheerjaj. Only thing is links reassignment should be taken care of. On Wed, Aug 31, 2011 at 10:40 AM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: remove the 'n' nodes from the beginning..push in the stack..pop them up and insert at the end of linked list..till the stack

Re: [algogeeks] Re: Problem on overflow

2011-08-28 Thread Avinash LetsUncomplicate..
@dave i was saying if user input a .. he can enter aintmax then how to detect overflow? -- 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

Re: [algogeeks] Re: Problem on overflow

2011-08-28 Thread Avinash LetsUncomplicate..
@Saurabh being ready to run your code for unsatisfactory input doesn't seem more logical than trying to find out if you can do something about it. i would have loved a kind reply from you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] Re: Problem on overflow

2011-08-27 Thread Avinash LetsUncomplicate..
@dave if number a is entered exceeding limit(already overflowed) then a goes negative(if a was entred just more than limit ) /a goes positive (if a was entred sufficiently more than limit ) maxint -a=b concept fails Avinash Katiyar NIT Allahabad -- You received this message because you

Re: [algogeeks] Problem on overflow

2011-08-27 Thread Avinash LetsUncomplicate..
@dave i was saying if user enter a+b in which aintmax .. A goes negative(if a sligtly intmax) a+b =no overflow which we know shouldnt be an answer.. On 8/28/11, Dave dave_and_da...@juno.com wrote: @Kunal: You are very kind. Dave On Aug 27, 12:58 pm, Kunal Patil kp101...@gmail.com wrote:

Re: [algogeeks] Re: Concept of Pointer

2011-08-24 Thread Avinash LetsUncomplicate..
++ is simply post increment will increment after use so *s is printed in first printf.. precedence doesnt matter coz its a single operand on which post increment has to be done also no copncept of associativity i think associativity is for same precedence operators .. Avinash NIT allahabad

[algogeeks] Re: COMMVAULT

2011-08-21 Thread Avinash
Written- computer test with around 30 question with 4 options. They ask question on c- string operations (like strcpy, strstr etc), file system, binary tree, linked list, function pointer, array, malloc, free, structure, printf, scanf etc etc... all you need to solve. focus on these things in fact

Re: [algogeeks] c output doubt

2011-08-12 Thread Avinash Dharan
Pointer incrementation and subtraction are done in terms of memory blocks and not addresses of memory. For example, int *p; p++; The pointer here jumps to the next integer location and not the next address in memory. Similarly,pointer subtraction will give the difference in indexes and not the

Re: [algogeeks] c output doubt

2011-08-12 Thread Avinash Dharan
On Fri, Aug 12, 2011 at 11:55 AM, Avinash Dharan avinashdha...@gmail.comwrote: Pointer incrementation and subtraction are done in terms of memory blocks and not addresses of memory. For example, int *p; p++; The pointer here jumps to the next integer location and not the next address

[algogeeks] Re: Amazon - Longest palindrome in a string in O(n)

2011-06-23 Thread Avinash
http://stevekrenzel.com/articles/longest-palnidrome But for some reason it is failing for string ISAAS, may be my understanding is incorrect. Thanks Avinash http://avi-programming-blog.blogspot.com/ On Jun 21, 11:31 pm, Swathi chukka.swa...@gmail.com wrote: Does any one know how to return

Re: [algogeeks] what to learn python or perl

2011-03-16 Thread Avinash Dharan
I second them. Python would be my choice. On Wed, Mar 16, 2011 at 10:18 AM, pacific pacific pacific4...@gmail.comwrote: I vote for python. On Wed, Mar 16, 2011 at 10:03 AM, kracekumar ramaraju kracethekingma...@gmail.com wrote: Hello Python vs Perl been battle for more than 20

Re: [algogeeks] palindrome substring

2010-06-18 Thread Avinash Dubey
to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Avinash Dubey +91-7799562235 -- You received

Re: [algogeeks] Linear time sieve

2009-12-01 Thread Avinash Dubey
to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Avinash Dubey MNNIT

Fwd: [algogeeks] Re:

2009-06-02 Thread Avinash Dubey
-- Forwarded message -- From: Dhruva Sagar dhruva.sa...@gmail.com Date: Tue, Jun 2, 2009 at 4:23 PM Subject: [algogeeks] Re: To: algogeeks@googlegroups.com Yea! You could confirm from the excel sheet...This place is not for such jokes Thanks Regards, Dhruva Sagar. George