[algogeeks] Amazom interview question

2010-12-03 Thread Prims
You are given 'n' appointments. Each appointment contains startime and endtime. You have to retun all conflicting appointments efficiently starttime and endtime can range from a few min to few years. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

Re: [algogeeks] Re: N companies merge

2010-12-03 Thread sharad kumar
merge N/2 +1 times... On Sat, Dec 4, 2010 at 7:48 AM, Gene wrote: > This isn't quite right because you don't have to merge all the initial > companies pairwise. I.e. you skip the case where A and B merge and > then the result is merged with C. > > Rather, the answer is the number of binary tree

[algogeeks] Re: N companies merge

2010-12-03 Thread Gene
This isn't quite right because you don't have to merge all the initial companies pairwise. I.e. you skip the case where A and B merge and then the result is merged with C. Rather, the answer is the number of binary trees with N leaves. (This does assume that all mergers involve only 2 companies.)

[algogeeks] Re: L-Value & R-Value

2010-12-03 Thread Gene
These are attributes of expressions in programming languages. They are normally computed by compilers during type checking. An expression is r-valued if its _value_ is of interest, for example the right hand side of an assignment or an actual parameter to be passed in to a function. An expressio

[algogeeks] Microsoft interview question

2010-12-03 Thread siva viknesh
Modified 2 color sort problem i.e. you are given an array of integers containing only 0s and 1s.You have to place all the 0s in even position and 1s in odd position. And if suppose, no. of 0s exceed no. of 1s or vice versa then keep them untouched. Do that in ONE PASS and without taking extra memo

[algogeeks] L-Value & R-Value

2010-12-03 Thread bittu
Can Any one Expalin in Briefly WHAT exactly is Lvalue-Rvalue is...thnx in Advance Regards Shashank -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this grou

Re: [algogeeks] N companies merge

2010-12-03 Thread Harshal
Nc2 * N-1c2 * N-2c2 * . * 2c2. where Nc2 means the number of combinations that can be made out of N numbers taken 2 at a time. After merging any 2 companies, you will have N-1 companies left, and so on. If I interpreted the question correct, this is my solution. Any more ideas? harsh -- You