On Thursday, August 29, 2013 11:09:59 PM UTC-4, yash wrote:
--
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...@googlegroups.com.
--
Vinay
http://www.cut-the-knot.org/wgraph.shtml
Every distribution of wine in the three jugs A, B, and C, can be described
by the quantities b and c of wine in the jugs B and C, respectively. Thus
every possible distribution of wine is described by a pair(b, c). Initially
b=c=0 so that one starts
This search can be done easily in O(n+m) start from top right corner. chek
out this link you will understand!!
http://www.geeksforgeeks.org/archives/11337
On Sunday, 1 April 2012 21:18:26 UTC+5:30, ashgoel wrote:
--
You received this message because you are subscribed to the Google Groups
answer should be 3/5
think like that tossing 5 times will not help you predict the outcome
of sixth toss. Therefore that information is meaningless.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
I forgot to mention
Time complexity: O(n), Space complexity: O(1)
Assuming you accept my solution :-)
On Mon, Feb 28, 2011 at 9:27 PM, Vinay Pandey babbupan...@gmail.com wrote:
Hi,
Here is my solution, let me know:
/* a helper function */
void swap(int* arr, int index1, int index2
each pair of opposite faces can make 4 such triangles, so I think the answer
is 12
On Mon, Feb 28, 2011 at 5:47 AM, sourabh jakhar sourabhjak...@gmail.comwrote:
the answer would be more than 8 an it is 32 i think.
but i m sure it will be more than 8
On Wed, Feb 23, 2011 at 7:54 AM, Terence
Hi,
Here is my solution, let me know:
/* a helper function */
void swap(int* arr, int index1, int index2) {
/* this is only to swap to integers */
arr[index1] = arr[index1]^arr[index2];
arr[index2] = arr[index1]^arr[index2];
arr[index1] = arr[index1]^arr[index2];
}
/* Actual switching */
void
of this algo is N*N , if we try balancing the tree while
inserting I guess it can be done in NlogN
Thanks
Vinay
On Fri, Feb 25, 2011 at 9:20 AM, Gene gene.ress...@gmail.com wrote:
Dave's solution is best if numerical error is possible.
If the points are precise, you can also do it in linear
U need to construct a binary tree given only PreOrder traversal with the
condition that each node has zero or two children.
On Wed, Feb 23, 2011 at 10:52 AM, murthy.krishn...@gmail.com
murthy.krishn...@gmail.com wrote:
hii vinay,
can u elaborate the third question
thanks,
Krishna
, where every node has zero or
two children.
e.g String = NNNLLL , N represents internal Node , L represents leaf
Node.
The alloted time was 1hr. and asked to write the function only ... no main
function and all.
hope this helps
Thanks
vinay
On Wed, Feb 16, 2011 at 3:45 PM, Anurag Bhatia abhati
can u plz elaborate how min heap helps to find most repeating words
On Oct 21, 6:40 am, ashish agarwal ashish.cooldude...@gmail.com
wrote:
use a array of 10 and apply min heap
On Thu, Oct 21, 2010 at 7:05 PM, Vinay... vinumars...@gmail.com wrote:
how do u find 10 most repeating words
how do u find 10 most repeating words on a large file containing words
in most efficient way...if it can also be done using heapsort plz post
ur answers..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
I think by defining equivalnces also we can print miracle
for ex -1%2 and 1%2 are same and 1%2!=0 odd%2 and -odd%2 are same and odd!=0
but -1%2 is giving -1 .
but don't know how to make it 1.
help someone if possible.
On Mon, Aug 30, 2010 at 12:40 AM, srinivas reddy
which tree?
On Tue, Feb 10, 2009 at 7:01 AM, praba garan prabagara...@gmail.com wrote:
how to find the successor of an element in a tree ??
thank u
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm
How about recursive way:
int funcNoDiv(int divisor, int dividend)
{
//base case
if(divisor == dividend)
{
return 1;
}
else if( divisor dividend)
{
return 0;
}
else // divisor dividend
{
while(divisor = dividend)
{
divisor = divisor 1;
Sorry but lets start with a quotient of 1
On 10/7/07, Vinay Chilakamarri [EMAIL PROTECTED] wrote:
How about recursive way:
int funcNoDiv(int divisor, int dividend)
{
//base case
if(divisor == dividend)
{
return 1;
}
else if( divisor dividend)
{
return 0
logic.. Ill post the bit shifting
algo soon
~_
On 10/7/07, Ajinkya Kale [EMAIL PROTECTED] wrote:
@Vinay : Can you please explain the algorithm of your code..
On 10/7/07, Vinay Chilakamarri [EMAIL PROTECTED] wrote:
How about recursive way:
int funcNoDiv(int divisor, int dividend
in the previous logic, dont forget to address a negative divisor, dividend
and alternative cases like those... it shud be pretty easy
On 10/8/07, Vinay Chilakamarri [EMAIL PROTECTED] wrote:
hey there i did play around with bit shifting sometime ago and was able to
do that.. but yeah i guess
The example given by Atamurad suits my need..
On Mar 28, 4:09 pm, vinay [EMAIL PROTECTED] wrote:
Hai all,
Given a N X N Matrix( with +ve integers), How to find the elements,
such that only one element from each row and one element from each
column and sum of the elements is minimum.
Thanks
19 matches
Mail list logo