Re: [algogeeks] Design Questions/Answers with UML

2014-06-27 Thread Gaurav Gupta
Hi, I am also looking for same ..please let me know in case you found some good source or good website to get examples of design problesm. Thanks & Regards, Gaurav kumar gupta Senior Software Engineer Samsung Research India,Bangalore Contact No:+91-9538147434 Email id: gauravnit...@gmail

Re: [algogeeks] Number of paths

2013-02-21 Thread Gaurav Rana
number of ways to choose n right selections out of total (n+m) selection.(m+n)C(n) On Thu, Feb 21, 2013 at 2:29 PM, Karthikeyan V.B wrote: > Assuming that u can either move down or right, > > Using Dynamic Programming, > > a DP equation can be framed like this : Paths[i][j] = paths[i][j-1] +

Re: [algogeeks] Number of paths

2013-02-21 Thread Gaurav Rana
(m+n)C(n) On Thu, Feb 21, 2013 at 1:26 PM, shady wrote: > Given a matrix of size mXn, find the number of paths from the top left > cell to the bottom right cell. > > BFS is one way... any other approach ? > > -- > You received this message because you are subscribed to the Google Groups > "Algo

Re: [algogeeks] Re: perfect square condition checking....

2013-02-06 Thread Gaurav Rana
if(n&(n-1)==0) //perfect square On Thu, Feb 7, 2013 at 3:01 AM, Don wrote: > The following is a bit faster than the Newton's Method solution I > suggest above. It uses a binary square root algorithm as seen here: > > http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Binary_numeral_

Re: [algogeeks] Re: swap objects without temp variable

2012-11-19 Thread Gaurav Gulzar
one liner a^=b^=a^=b On Mon, Nov 19, 2012 at 4:30 PM, abhinav gupta wrote: > we need to use + and - as operator overloading. so, that i will work f9 > for ur objects. > > so make operator overloading for + and - operator. > > > On Sat, Nov 17, 2012 at 9:12 PM, AISHWARYA KUMAR wrote: > >

[algogeeks] Re: spoj problem EASYMATH

2012-09-27 Thread gaurav yadav
thanx :) -- 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/-/iy_uho_bmMYJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

[algogeeks] Re: spoj problem EASYMATH

2012-09-26 Thread gaurav yadav
> > an idea of the approach would be enough.. plz 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/-/3H3O2K4KBBMJ. To post to this group, send ema

Re: [algogeeks] spoj problem EASYMATH

2012-09-26 Thread gaurav yadav
an idea of the approach would be enough.. plz help.. -- 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...@googleg

[algogeeks] spoj problem EASYMATH

2012-09-25 Thread gaurav yadav
help needed in spoj problem EASYMATH .. i thought about inclusion exclusion principle but unable to get to a solution.. plz help.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on

Re: [algogeeks] Gate complaxity question

2012-08-26 Thread GAURAV CHAWLA
p, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards, GAURAV CHAWLA +919992635751 +919654127192 -- You received this message because you are subscribed to the Googl

Re: [algogeeks] Re: MS interview

2012-08-24 Thread GAURAV CHAWLA
ups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post

[algogeeks] MS interview

2012-08-24 Thread GAURAV CHAWLA
Ques Given a large text... in the text.. there are > , < etc representing > and <.(there can be others like &eq; etc) the task is to replace such (>) with the '>' symbol... and (<) with '<' given the table which have corresponding matches... and table is fin

[algogeeks] MS interview

2012-08-22 Thread GAURAV CHAWLA
Ques.. Given a m-word dictionary ... and a n-sized word... .. now suggest DS for dictionary such that you can find out all the anagrams of the given word present in dictionary... -- Regards, G C -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" gr

Re: [algogeeks] plz explain output y it is 1212

2012-08-17 Thread gaurav yadav
Hi..please repost your code after properly formatting ...it is not readable...and throws compilation errors. -- 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

Re: [algogeeks] Re: Interview Question

2012-08-16 Thread gaurav yadav
@sahil Can you please explain your question with an example ? -- 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] Codeforces Problem

2012-08-15 Thread gaurav yadav
@aman +1 -- 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, visit this gro

Re: [algogeeks] Codeforces Problem

2012-08-15 Thread gaurav yadav
[image: Inline image 1] If u look at the pattern closely...and count the number of tiles vertically from left...the pattern followed is 2,3,4,4,3,2 and 2+3+4+4+3+2=18 so for any a,b,c...u will need an array of size A[b+c-1] now start populating the array from start and end simultaneously and incr

[algogeeks] Sequence problem

2012-06-30 Thread Gaurav Popli
find the nth term for the sequence... 3, 8, 12, 17, 22, 28, 35 -- 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+unsub

Re: [algogeeks] expectation values..

2012-06-18 Thread Gaurav Popli
sum_{i=1}^{2} 2/i = 2/1 + 2/2 = 3 \newline] >> >> >> Hope it helps! >> >> >> -- >> Amitesh >> >> >> >> >> On Sat, Jun 16, 2012 at 5:18 PM, Gaurav Popli wrote: >> >>> What is the expected number of throws of his die

Re: [algogeeks] expectation values..

2012-06-17 Thread Gaurav Popli
i=1}^{N} N/i \newline for\; N =~2 ; >> \newline \sum_{i=1}^{2} 2/i = 2/1 + 2/2 = 3 \newline] >> >> >> Hope it helps! >> >> >> -- >> Amitesh >> >> >> >> >> On Sat, Jun 16, 2012 at 5:18 PM, Gaurav Popli wrote: >> >&

[algogeeks] expectation values..

2012-06-16 Thread Gaurav Popli
What is the expected number of throws of his die while it has N sides so that each number is rolled at least once? e.g for n=2 ans 3.00 n=12 ans is 37.24... i refrd to expectation tutuorial at http://www.codechef.com/wiki/tutorial-expectation but still couldnt get the logic... any help? --

[algogeeks] spoj problem

2012-06-12 Thread gaurav yadav
plz nyone explain how to approach this problem.. http://www.spoj.pl/problems/XORROUND/ -- 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: Partition the array with equal average

2012-05-20 Thread GAURAV CHAWLA
roup at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > 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 f

Re: [algogeeks] Microsoft interview question

2012-05-20 Thread GAURAV CHAWLA
AHUJA >> M.N.N.I.T. >> ALLAHABAD >> >> >> -- >> 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 unsubs

Re: [algogeeks] Re: finding anagrams in a list of words

2012-05-15 Thread GAURAV CHAWLA
ascii values >>> of the individual alphabets as the key which would require tc-O(n) ??? >>> >>> >>> >>> On Sun, May 13, 2012 at 7:07 PM, GAURAV CHAWLA >> > wrote: >>> >>>> @deepikaanand: >>>> >>>> >

Re: [algogeeks] Re: finding anagrams in a list of words

2012-05-13 Thread GAURAV CHAWLA
@deepikaanand: 1 is not a prime no. and also ignore 2 as chosen prime no,. On Sun, May 13, 2012 at 6:31 PM, deepikaanand wrote: > > @gaurav > the approach suggested as : to have an array of 25 prime nos..How is > it supposed to work ; > cz(this is wat i have understood) if a :0

Re: [algogeeks] finding anagrams in a list of words

2012-05-11 Thread GAURAV CHAWLA
http://groups.google.com/group/algogeeks?hl=en. >> > > -- > 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 gro

Re: [algogeeks] Re: power func

2012-05-05 Thread Gaurav Popli
> parenthesis > } > } > > On Apr 29, 7:20 pm, Gaurav Popli wrote: >> givenn gcd of two integers a and b,.. >> you hvae to find max value of a^b%mod where mod is also given... > > -- > You received this message because you are subscribed to the Google Groups

[algogeeks] power func

2012-04-29 Thread Gaurav Popli
givenn gcd of two integers a and b,.. you hvae to find max value of a^b%mod where mod is also 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 g

[algogeeks] basic C

2012-04-06 Thread Gaurav Popli
http://www.spoj.pl/problems/HAJIME/ referring to this link i came up with this soln typedef/**/struct{unsigned/**/aku;char/**/*const/**/soku}zan; typedef struct{unsigned(aku);char*const(soku)}zan; need to know how to remove the space btw the second typedef and struct -- You received this me

[algogeeks] pascal triangle

2012-03-24 Thread Gaurav Popli
calculate the number of values in the triangle that are different from 1 and less than or equal to K. k>=2 1 1 1

[algogeeks] Array problem

2012-03-11 Thread Gaurav Popli
given an array of size n... create an array of size n such that ai where ai is the element in the new array at index location i is equal to sum of all elements in original array which are smaller than element at posn i... e.g ar[]={3,5,1,6,7,8}; ar1[]={0,3,0,9,15,22}; -- You received this messa

Re: [algogeeks] puzzle

2012-03-01 Thread Gaurav Popli
gt; On Wed, Feb 29, 2012 at 8:11 PM, Anurag atri >> wrote: >>> >>> nth term : (n! + 2^n - n) >>> >>> >>> On Wed, Feb 29, 2012 at 11:05 AM, Vaibhav Mittal >>> wrote: >>>> >>>> Ntn else is provided..?? >>>> &g

[algogeeks] puzzle

2012-02-27 Thread Gaurav Popli
Given a sequance of natural numbers. Find N'th term of this sequence. a1=2, a2=4, a3=11, a4=36, a5=147, a6=778 ... ... ... ... aN. this is a coding quesn and O(n) soln is also welcome... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.

[algogeeks] inbuilt container for building a balanced BST in c++ using stl

2012-01-24 Thread gaurav bansal
let say we want to build a binary search tree(BST) in a c++. we can use a map for that. map builts the "balanced" BST in the form of red black tree. now we want to a built a balanced BST in which we also want to modify the contents of internal nodes while inserting a node in bst. e.g each node has

Re: [algogeeks] Re: Amazon ques

2012-01-21 Thread gaurav arora
yeah...u r right -- 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, vi

[algogeeks] Re: sort 2D array

2012-01-14 Thread Gaurav Kalra
Bases on algorithm suggested by Lucifer, I have coded the problem in C (please see attachment). The code has been tested against the following test cases: 1 3 4 8 9 2 5 18 25 50 6 7 22 45 55 and 1 2 7 3 5 8 4 6 9 -- You received this message because you are subscribed to the Google Groups "

[algogeeks] Re: Longest sequence of numbers with atmost diff K

2012-01-04 Thread gaurav bansal
@all sorry for my prev post. On Jan 5, 12:42 am, gaurav bansal wrote: > your algo wont work for  a[]={8,11,2} with k=7. > acc to u,ans should be 3,but it is 2. > you are not considering the diff between max and min value -- You received this message because you are subscribed to t

[algogeeks] Re: Longest sequence of numbers with atmost diff K

2012-01-04 Thread gaurav bansal
your algo wont work for a[]={8,11,2} with k=7. acc to u,ans should be 3,but it is 2. you are not considering the diff between max and min value -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@go

Re: [algogeeks] Amazon Onsite

2012-01-04 Thread gaurav arora
Sorry there is some correction p[] : array of petrol d[]: array of distance int FirstPetrolPump(int p[],int d[],int n) { int c=0,ThisPetrol=0,FirstPump=0,i; for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Amazon Onsite

2012-01-03 Thread gaurav arora
@ankur : I also think u r right @everyone : Plz check if my code is right p[] : array of petrol d[]: array of distance int FirstPetrolPump(int p[],int d[],int n) { int c=0,ThisPetrol=0,FirstPump=0,i; for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Re: Questions

2012-01-02 Thread gaurav arora
we can use Boyer's Moore algo int isSubset(int*mat,int p,int q,int*arr,int n) { int h; h=hash(arr,n); for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Re: Nice question

2011-12-13 Thread Gaurav Kumar
Thanks for pointing out the issue with my logic. What I am wondering is what is the general solution to finding the number of possible numbers? Is the only way is to try these combinations? Please share if you know. Gaurav On Tue, Dec 13, 2011 at 1:56 PM, Gaurav Kumar wrote: > > > On

Re: [algogeeks] Re: Nice question

2011-12-13 Thread Gaurav Kumar
28282 > 9393939393 > > If your algorithm gives an answer other than 7, keep working on it. > > Don > > On Dec 13, 1:46 pm, Gaurav Kumar wrote: > > > > 3 2 5 1 so the total number of numbers possible are (10-3) x 2 x (10- 2) > x > > 2 x (10 -5 ) x 2 x (10

Re: [algogeeks] Suggest Algo for this Question

2011-12-13 Thread Gaurav Kumar
Why can't we keep removing the minimum element each time and compare it with x? This should take O(k) time since in a Min heap, the minimum element can be removed in O(1) time? Am I missing something? On Tue, Dec 13, 2011 at 8:43 AM, atul anand wrote: > O(k) in the worst-case , then i guess it w

Re: [algogeeks] Re: Nice question

2011-12-13 Thread Gaurav Kumar
are (10 - 0) x 2 / 2 x 1 way x 1 way = 10 ways Gaurav On Tue, Dec 13, 2011 at 10:55 AM, Gaurav Kumar wrote: > When the difference is 0, the numbers will be repeated: > 000, 111, 222, 333, 444, 555, 666, 777, 888, 999 but only these are > possible. > > Gaurav > > > On Tue,

Re: [algogeeks] Re: Nice question

2011-12-13 Thread Gaurav Kumar
When the difference is 0, the numbers will be repeated: 000, 111, 222, 333, 444, 555, 666, 777, 888, 999 but only these are possible. Gaurav On Tue, Dec 13, 2011 at 10:47 AM, Don wrote: > Moheed, > If n=3 and absdiff = {0,0}, your program says that there are 100 > possible numbers

Re: [algogeeks] Sub-array problem

2011-12-12 Thread Gaurav Kumar
ubarrays with the maximum sum. If you come up with an input which gives incorrect result or if you see any bug in the logic, please let me know, I will be happy to go over it again. Thanks Gaurav On Dec 12, 2011, at 4:44 AM, Lucifer wrote: > @ Gaurav > > I don't think the above

Re: [algogeeks] Sub-array problem

2011-12-10 Thread Gaurav Kumar
leftResult.total <= k && leftResult.total >= rightResult.total && leftResult.total >= crossResult.total) return leftResult; else if(rightResult.total <= k &&

Re: [algogeeks] Sub-array problem

2011-12-09 Thread Gaurav Kumar
I think we can also solve this using divide and conquer: The algorithm is based on the concept of diving the current array into two parts and then considering if the solution exists, in the first part from lo to mid and last part from mid+1 to high and the case in which the subarray crosses the

Re: [algogeeks] Number Theory (Power of 3 )

2011-12-09 Thread Gaurav Kumar
of 3. Gaurav On Dec 7, 2011, at 6:03 PM, saurabh singh wrote: > Originaly problem rules out the use of log.Moreover log (or any floating > point operations) take lot of hardware time as they are emulated on the > floating point environment on most machines.Thirdly precision pr

Re: [algogeeks] Re: Inplace Array Convertion

2011-10-14 Thread gaurav yadav
@shiva...keep swapping the underline elements a1*a2*a3a4a5*b1*b2b3b4b5c1c2c3c4c5 a1b1*a3*a4a5a2b2b3b4b5*c1*c2c3c4c5 a1b1c1*a4*a5*a2*b2b3b4b5a3c2c3c4c5 a1b1c1a2*a5*a4*b2*b3b4b5a3c2c3c4c5 a1b1c1a2b2*a4*a5b3b4b5a3*c2*c3c4c5 a1b1c1a2b2c2*a5*b3b4b5*a3*a4c3c4c5 a1b1c1a2b2c2a3b3*b4*b5a5a4*c3*c4c5 a1b1c1a

Re: [algogeeks] Re: Inplace Array Convertion

2011-10-14 Thread gaurav yadav
consider following example... suppose initailly we have a1a2a3b1b2b3c1c2c3 then do the following-> a1a2a3 b1b2b3 c1c2c3 (look for b1 in the remaining array and swap with a2 , so in this case swap(a2,b1) ) a1b1a3 a2b2b3 c1c2c3 (similarly swap(a3,c1) ) a1b1c1 a2b2b3 a3c2c3swap(b3,

Re: [algogeeks] Stone Game

2011-10-13 Thread Gaurav Kumar
Note that the problem says that the pile has AT LEAST i stones not exactly i stones. So it can for sure have more than i. On Thu, Oct 13, 2011 at 4:50 PM, Gaurav Kumar wrote: > I don't see this code considers the case when after throwing i stones, the > pile is still left with (S

Re: [algogeeks] Stone Game

2011-10-13 Thread Gaurav Kumar
I don't see this code considers the case when after throwing i stones, the pile is still left with (Si-i) stones. For example, let say pile 10 had 25 stones, now even after throwing 10 stones, pile 25 would be left with 15 stones, which could again be thrown by the next person. Am I missing somethi

Re: [algogeeks] adobe question help

2011-10-11 Thread Gaurav Kumar
int left = max - ((1 << j) - 1); 6 7 // 1's after position i 8int right = ((1 << i) - 1); 9 10 // 1's, with 0s between i and j 11 int mask = left | right; 12 13 // Clear i through j, then put m in there 14 return (n & mask) | (m << i); 15 } Ga

Re: [algogeeks] explain the output please.....

2011-10-07 Thread gaurav yadav
hey raghav my turbo c compiler gives output fail1pass2 -- 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...@googl

Re: [algogeeks] explain the output please.....

2011-10-07 Thread gaurav yadav
* im using devc compiler * when if(c>i) is encountered since integer has higher precedence over char ,so char is type casted to int so, (c>i) is equivalent to (-64>-32) which is false ,so fail1 is printed, -16 is converted to 4,294,967,295 - 16=4,294,967,280(so it is unsigned now) for(i(4,294,967

Re: [algogeeks] explain the output please.....

2011-10-07 Thread gaurav yadav
@raghav garg...run the code and see the output,the output comes fail1pass2 -- 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 algoge

Re: [algogeeks] can somebody kindly explain what would be the output for the following program

2011-10-06 Thread gaurav yadav
output= b try running on turbo c . -- 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 mor

Re: [algogeeks] money matters

2011-10-06 Thread gaurav yadav
can u plz expain imnewcoder's approach with an example...? -- 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...@g

Re: [algogeeks] Adobe

2011-10-05 Thread gaurav yadav
which college? -- 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, visit thi

Re: [algogeeks] Re: best way to learn data structure

2011-10-04 Thread gaurav yadav
join any coding sites, like codechef,spoj,topcoder start coding regularly -- 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 algogee

Re: [algogeeks] codechef mixtures problem

2011-10-04 Thread gaurav yadav
the above question is similar to matrix-chain multiplication on page number -370,dynamic programming chapter,Introduction to Algorithms,t h cormen,leiserson,rivest,stein -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, s

Re: [algogeeks] Re: rise and fall of power

2011-10-04 Thread gaurav yadav
nk 34 9: 117566389 23 8: 20880467 92 9: 466101087 1997: 2963208 234232 9: 943982129 3476566 9: 226270832 56999 9: 349261536 9 9:

Re: [algogeeks] Re: rise and fall of power

2011-10-04 Thread gaurav yadav
I am using following statements to print the first... scanf("%lf%lf",&n,&k); double v = n*log10(n); double dummy; double ff = modf(v,&dummy); double val = floor(pow(10.0,ff+k-1)); printf("%.0f",val); this code works fine when for big values of n like n=2

Re: [algogeeks] rise and fall of power

2011-10-03 Thread gaurav yadav
since 1 ≤ *n* ≤ 109 so for n=10^9 you would need an array of size (10^9)^(10^9) which is not possible.. so your approach wont help. -- 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.

Re: [algogeeks] New Group For Practicing and Learning Efficient Ways of Coding

2011-10-03 Thread gaurav yadav
I think once the questions are posted more peolpe will join in... -- 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+unsubs

[algogeeks] Re: MS WRITTEN TEST FOR INTERNS

2011-10-02 Thread gaurav kumar
pec, unversity of technology chandigarh On Oct 2, 10:46 pm, rahul sharma wrote: > hey from which college r u??? > > > > > > > > On Sun, Oct 2, 2011 at 10:51 PM, gaurav kumar wrote: > > there were 10 objective questions covering c,c++ and ds > > que

[algogeeks] amazon writtwen test

2011-10-02 Thread gaurav kumar
25 objective questions focused on operatig system basic commands of linux aptitude - 4-5 questions rest on algos, ds, c nd c++ 3 subjective questions 1) merge two sorted link list 2) u have given coins of vrious denominations and u have to make a sum with min. no. of coins 3) an amazon own alogo fo

[algogeeks] MS WRITTEN TEST FOR INTERNS

2011-10-02 Thread gaurav kumar
there were 10 objective questions covering c,c++ and ds questions were on mainly memory allocation stack and heap ,etc output/error ; subjective part 1. compress the given string eg. aaabbcccaadee o/p = a3b2c3de2 2. u have to give the various test case and fault cases for a USB device such that

Re: [algogeeks] structure padding

2011-10-02 Thread gaurav yadav
@rahul sharma struct a { int a; float b; char c; }b; printf("%d",sizeof(b)); when u declare a struct variable (b in this case)...4 bytes are used for int a,4 for float b and similarly 4 bytes for char c(though only 1 byte is actually used). but now look at following code..

Re: [algogeeks] Amdocs

2011-10-02 Thread gaurav yadav
my number= +919939569122 gtalk id=gauravyadav1...@gmail.com -- 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] Give the logic for it

2011-10-02 Thread gaurav yadav
let arr1[5]={6,7,8,9,10} arr2[5]={1,2,3,4,8} your codes gives answer=5 which is not correct... the correct answer should be=6.5 but since you are returning integer and answer would be=6 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. T

Re: [algogeeks] Amdocs

2011-10-02 Thread gaurav yadav
I cracked amdocs interview...u need to stress on following topics.. *ONLINE TEST* 1)UNIX Questions on various commands.Important ones are ls,tr,head,tail,tee,gzip and questions on bash script. 2)SQL Questions on access levels for diff. users,outer join,inner join,left and right join,ddl and dml c

Re: [algogeeks] output expalnation?

2011-09-26 Thread gaurav yadav
b=6 will not execute.. -- 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, v

Re: [algogeeks] google os ques on pipelining

2011-09-26 Thread gaurav yadav
bharatkumar bagan...can u plz explain why u multipiled (160+5) with 999 ? -- 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 algogeek

Re: [algogeeks] Amazon Interview Question

2011-09-24 Thread Gaurav Aggarwal
red ball, and 2 a black ball. Using only swap operations (counting >> >>>>>> sort not allowed) >> >>>>>> rearrange the string such that all blue balls are together on one >> >>>>>> side, followed by all red >> >&g

Re: [algogeeks] Networking:suggest some book

2011-09-17 Thread Gaurav Menghani
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 > http:

[algogeeks] Re: royal bank of scotland

2011-09-16 Thread gaurav bansal
is GD a part of a selection process or only personal interviews are taken after shortlisting On Sep 16, 10:30 pm, rahul sharma wrote: > i was teellling about placement procedure > > On Fri, Sep 16, 2011 at 9:12 PM, Rahul Verma wrote: > > > > > > > > > Opportunities for the experienced candidates.

Re: [algogeeks] I want resources to learn algorithms on Permutation and Combination problems and Graph algorithms except CLRS..

2011-09-16 Thread Gaurav Menghani
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 > http://gr

Re: [algogeeks] Party Lamps

2011-09-15 Thread Gaurav Menghani
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, visit this group at

Re: [algogeeks] SPOJ PIE

2011-09-15 Thread Gaurav Menghani
lt; largest << endl; >                double ans = largest * pi; >                printf("%.4lf\n", ans); >        } >        return 0; > } > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group

Re: [algogeeks] pgm2

2011-09-12 Thread Gaurav Popli
jsut count the frequencies of each alphabetif the length is odd then all even except one else all even.. On Tue, Sep 13, 2011 at 12:11 AM, parag khanna wrote: > .write a program to find out if a word is a possible palindrome or > not...eg:tsetes becomes a palindrome aftr rearranging the lett

Re: [algogeeks] MICROSOFT WRITTEN QUESTION

2011-09-10 Thread Gaurav Menghani
.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@go

Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread Gaurav Menghani
scribe 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. > -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups "Algori

Re: [algogeeks] Re: How can we find second largest element in an array... in O(n+logn-2)... give me proof.....

2011-09-10 Thread Gaurav Menghani
> > >>>> > > -- >>>> > > @ |3  # ! /\/ @ \./ >>>> > >>>> > -- >>>> > @ |3  # ! /\/ @ \./- Hide quoted text - >>>> > >>>> > - Show quoted text - >>>> >>>> -- &g

Re: [algogeeks] MICROSOFT WRITTEN QUESTION

2011-09-10 Thread Gaurav Menghani
On Sat, Sep 10, 2011 at 11:28 AM, teja bala wrote: > @Gaurav > > wat if here is n=1 > den >  W(0)=? > >  i dint get that See, when you get to W(0) state, that means, you have created a valid combination. That means, you have gone through one 'path' through the var

Re: [algogeeks] Find th gcd of 2 nos in the most efficient way

2011-09-10 Thread Gaurav Menghani
gogeeks@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. > -- Gaurav Menghani -- You received this message because you are subs

Re: [algogeeks] MICROSOFT WRITTEN QUESTION

2011-09-10 Thread Gaurav Menghani
-up. Search for Bottom-up DP. -- Gaurav Menghani -- 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 algog

Re: [algogeeks] MICROSOFT WRITTEN QUESTION

2011-09-10 Thread Gaurav Menghani
e 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 > http://groups

Re: [algogeeks] How can we find second largest element in an array... in O(n+logn-2)... give me proof.....

2011-09-10 Thread Gaurav Menghani
;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. > &

Re: [algogeeks] Digest for algogeeks@googlegroups.com - 25 Messages in 9 Topics

2011-09-07 Thread Gaurav Menghani
5 canvases, bt he cn make using just 1. >> >> >> >> >> >> >> >> rahul vatsa Sep 07 08:35AM -0400 ^ >> >> sry, wrongly i ve written 1 in 1st ln of my prev mail. its 25. >> >> >> >> >> rahul vatsa Sep 07 08:36A

Re: [algogeeks] SPOJ

2011-09-06 Thread Gaurav Menghani
d 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. > -- Gaurav Menghani -- You received this message because yo

Re: [algogeeks] Adding Two no without using any operator...??

2011-08-27 Thread Gaurav Menghani
eeks@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. > -- Gaurav Menghani -- You received this message because you are subscribe

Re: [algogeeks] SPOJ Problem DIVSUM

2011-08-27 Thread Gaurav Menghani
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. > -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups &qu

Re: [algogeeks] SPOJ Problem DIVSUM

2011-08-27 Thread Gaurav Menghani
http://lmgtfy.com/?q=pollard%27s+rho+algorithm On Sat, Aug 27, 2011 at 11:05 PM, Rahul Verma wrote: > @gaurav Thanks dear > Could you please explain the algorithm. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks

Re: [algogeeks] SPOJ Problem DIVSUM

2011-08-27 Thread Gaurav Menghani
ssion on the web visit > https://groups.google.com/d/msg/algogeeks/-/vld8Fghb1twJ. > 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] Remove all Duplicates Words

2011-08-24 Thread Gaurav Menghani
e 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 > http://gr

[algogeeks] Re: constructor ques

2011-08-23 Thread gaurav kumar
+1 coder On Aug 23, 1:31 am, JAIDEV YADAV wrote: > 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:3

  1   2   3   >