Re: [algogeeks] Re: GOOGLE Q1

2013-02-05 Thread Vandana Bachani
facebook.com/profile.php?id=10655377926>* >> >> -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to algogeeks+unsubscr..

Re: [algogeeks] Need Help with PHP/HTML

2012-07-16 Thread Vandana Bachani
, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Vandana Bachani Graduate Student, MSCE Computer Science & Engineering Department Texas A&M University, College Station --

Re: [algogeeks] how to approach this kinda problmls

2012-04-20 Thread Vandana Bachani
A bunch of optimizations are possible like caching via hashing PDS numbers as u find for prior inputs so that some of those can be used for next inputs, etc. But first try to develop a simple algorithm. -Vandana On Fri, Apr 20, 2012 at 2:48 PM, Vandana Bachani wrote: > hi Amrit, > Fir

Re: [algogeeks] how to approach this kinda problmls

2012-04-20 Thread Vandana Bachani
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. > -- Vandana Bachani Graduate Student, MSC

Re: [algogeeks] program to convert roman to integer.........

2011-11-06 Thread Vandana Bachani
ause 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, visit this group at >

Re: [algogeeks] Dp solution for this problem?

2011-10-31 Thread Vandana Bachani
; 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. >> >> > > > -- > Mohit > > -- > You received this message bec

Re: [algogeeks] Dp solution for this problem?

2011-10-30 Thread Vandana Bachani
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. > -- Vandana Bachani Graduate Student, MSCE Computer Science & Engi

Re: [algogeeks] FACEBOOK ONLINE CODING ROUND

2011-10-19 Thread Vandana Bachani
Completing it... Got sent before I completed On Wed, Oct 19, 2011 at 12:31 PM, Vandana Bachani wrote: > Better logic: > create a list array of lists 'arr' (like a hash table with lists). Array > size is N represents 1 to N bits and lists that will increase as we add more

Re: [algogeeks] FACEBOOK ONLINE CODING ROUND

2011-10-19 Thread Vandana Bachani
Better logic: create a list array of lists (like a hash table with lists). Array size is N represents 1 to N bits and lists that will increase as we add more elements to it. for(i = 1; i < 2^N; i++) { c = count no. of 1s. in i } On Wed, Oct 19, 2011 at 12:16 PM, Vandana Bachani wrote: &

Re: [algogeeks] FACEBOOK ONLINE CODING ROUND

2011-10-19 Thread Vandana Bachani
Hi, logic: We can work on this problem from the way we construct the sequence. First we generate a binary tree such that each leafnode corresponds to one of the 2^N nodes. We start we an empty root, creating 0, 1 nodes assigning one bit at a time upto N levels (there would be 2^N - leafnodes) but w

Re: [algogeeks] Memorization

2011-10-11 Thread Vandana Bachani
Hi Arvind, For the fibonacci series, we need to memoize only the the last 2 fibonacci numbers. We can even avoid recursion... So our regular fibonacci algorithm is the simplest example of a dynamic programming algorithm with memoization. To find nth fibonacci number: int p = 0, q = 1, f; for (int

Re: [algogeeks] Efficient Algo for Merging 2 Binary Search Trees

2011-10-08 Thread Vandana Bachani
Inorder traversal of one tree insert into another? On Sat, Oct 8, 2011 at 4:33 PM, Ankur Garg wrote: > Hi , > > Can anyone think of any better for doing this other than converting into > List and then converting back again to BST .. > > Regards > > -- > You received this message because you are

Re: [algogeeks] microsoft ques

2011-07-12 Thread Vandana Bachani
You have the right braces missing, it would result in a 0 depth for all cases. (Precedence of != is greater than =) On Tue, Jul 12, 2011 at 5:41 PM, nicks wrote: > i thought of this code..i think it should work.correct me if i am > wrong > > > depth=0;max=0; > while(*(*c=getchar()*)*!=EO

Re: [algogeeks] finding vlaue of nCr

2011-06-21 Thread Vandana Bachani
Why cant we first cancel the higher denominator first? Eg: For 10C3, 10!/(7!*3!) can be written as (10*9*8)/3!. This will be a little more performing if the difference in n/2 and r is significant. On Tue, Jun 21, 2011 at 1:09 PM, uttam tiwari wrote: > i think it can be done by look ups..i.e. we

Re: [algogeeks] [brain teaser] Aeroplane Hijack puzzle 30 may

2011-05-30 Thread Vandana Bachani
The hijacker was the "pilot". On Mon, May 30, 2011 at 12:34 PM, Lavesh Rawat wrote: > *Aeroplane Hijack puzzle SOLUTION > * > * > * > ** > *A man hijacks an aeroplane transporting both passengers(8 of them) and > valuable cargo. After taking the cargo, the man demands nine parachutes, > puts one

Re: [algogeeks] [brain teaser] MATHS TRICK TEASER 9 may

2011-05-10 Thread Vandana Bachani
1 from 19 makes 20 11 + 9 = 20 (take the one away from 19 and attach it to the other one and put a + between the 2) -Vandana On Tue, May 10, 2011 at 12:39 PM, Lavesh Rawat wrote: > *MATHS TRICK TEASER > * > * > * > ** > *Prove that taking away 1 from 19 makes 20. > * > > *Update Your Answers at

Re: [algogeeks] [brain teaser ] NUMBER SEQUENCE PUZZLE 9 may

2011-05-09 Thread Vandana Bachani
Corrected. On Mon, May 9, 2011 at 5:57 PM, Vandana Bachani wrote: > The answer is 3. > > Its a sequence of the number of characters in the word form of the index. > > "one", "two", "three", "four", "five", "six", "

Re: [algogeeks] [brain teaser ] NUMBER SEQUENCE PUZZLE 9 may

2011-05-09 Thread Vandana Bachani
The answer is 3. Its a sequence of the number of digits in the word form of the index. "one", "two", "three", "four", "five", "six", "seven" 3, 3, 5, 4, 4, 3, 5 On Mon, May 9, 2011 at 12:52 PM, Lavesh Rawat wrote: > NUMBER SEQUENCE PUZZLE > ** > * > * > ** > *Fill in the blanks: > 3 3 5 4 4 ?

Re: [algogeeks] [brain teaser ] sequence number puzzle 18april

2011-04-18 Thread Vandana Bachani
A funny one... until I figure out... It contains all numbers from 0 to 10 :P On Mon, Apr 18, 2011 at 1:58 PM, Lavesh Rawat wrote: > * sequence number puzzle > > What is special about the following sequence of numbers? > 8 5 4 9 1 7 6 10 3 2 0 > * > *Update Your Answers at* : Click > Here

Re: [algogeeks] please explain the output

2011-04-05 Thread Vandana Bachani
Hi Arvind, These are preprocessor specific operators. Check out http://msdn.microsoft.com/en-us/library/wy090hkc(v=vs.80).aspx -Vandana On Tue, Apr 5, 2011 at 12:45 PM, Arvind wrote: > #include > > #define f(a,b) a##b > #define g(a) #a > #define h(a) g(a) > > int main() > { > printf("%s",g(f(1,

Re: [algogeeks] [brain teaser ] 2april

2011-04-04 Thread Vandana Bachani
Letter 'e' On Mon, Apr 4, 2011 at 1:14 PM, Lavesh Rawat wrote: > *WHAT AM I Problem Solution* > * > *The beginning of eternity. The end of time and space. The beginning of > every end and the end of every place. What am I? > > *Update Your Answers at *: Click > Here

Re: [algogeeks] [brain teaser ] 31march

2011-03-31 Thread Vandana Bachani
1, 2, 3 On Thu, Mar 31, 2011 at 2:21 PM, Lavesh Rawat wrote: > *Find Numbers Problem * > * > *Find three whole, positive numbers that have the same answer when > multiplied together as when added together. > > Update Your Answers at : Click > Here

Re: [algogeeks] [brain teaser ] 29march

2011-03-31 Thread Vandana Bachani
T(5) = 41 + 3^4 = 122. On Thu, Mar 31, 2011 at 2:16 PM, Vandana Bachani wrote: > T(n) = T(n-1) + 3^(n-1), T(0) = 1 > > On Thu, Mar 31, 2011 at 11:20 AM, rahul wrote: > >> 1+1+0, 2+2+1, 5+5+4, 14+14+13, 41+41+40 >> >> On Tue, Mar 29, 2011 at 1:05 PM, Lave

Re: [algogeeks] [brain teaser ] 29march

2011-03-31 Thread Vandana Bachani
T(n) = T(n-1) + 3^(n-1), T(0) = 1 On Thu, Mar 31, 2011 at 11:20 AM, rahul wrote: > 1+1+0, 2+2+1, 5+5+4, 14+14+13, 41+41+40 > > On Tue, Mar 29, 2011 at 1:05 PM, Lavesh Rawat wrote: > >> *Series Problem Solution* >> >> 1, 2, 5, 14, 41, x >> Whats x ?? >> >> Update Your Answers at : Click

Re: [algogeeks] Re: puzzle

2010-12-31 Thread Vandana Bachani
The ant needs to cover: 9.403 units. It will need to pass the diagonal of the side (4 by 5) and go up or down the side 3 units. 3+ sqrt(16+25) On Fri, Dec 31, 2010 at 4:16 PM, bittu wrote: > > 2nd puzzle > > An ant has to crawl from one corner of a room to the diametrically > opposite corner as

Re: [algogeeks] MS

2010-10-16 Thread Vandana Bachani
Hi Harshal, The question is a bit unclear, especially given the *win and *def* pattern. Does it mean anything before "win" is acceptable or anything before and after "def" is acceptable? or is it like 'a' repeated any number of times followed by 'b' repeated any number of times... in a*b*cd*? I am