---
hari wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-6ef61f8152-0a1809a38a-VhQtjvDuk5tyOdsQd1DUn_Ec5dU
You'
We can sort using STL sort function in main() before function call of
arraysum().
On May 20, 6:49 am, Gunjan Sharma wrote:
> First of all there is an infinite loop in this code
> Secondly it works only for sorted array.
>
>
>
>
>
>
>
>
>
> On Fri, May 20,
In while loop have i,j which points first and last index of array. In
while loop, Check the sum of a[i],a[j], If sumk)
j++;
return b;
}
On May 20, 4:38 am, amit wrote:
> given an array of integers, and an integer k, find out two elements
> from the array whose sum is k in O(n) time. if no such
You are given:
* a positive integer n,
* an integer k, 1<=k<=n,
* an increasing sequence of k integers 0 < s1 < s2 < ... < sk <=
2n.
What is the number of proper bracket expressions of length 2n with
opening brackets appearing in positions s1, s2,...,sk?
plz.. explain how to solve th
I dont think it can be done without reversing the linked list!!
On Aug 25, 2:54 pm, Raj N wrote:
> Input : Two large singly linked lists representing numbers with most
> significant digit as head and least significant as last node.
> Output: Difference between the numbers as a third linked list w
Five pirates (of different ages) have 100 gold coins to divide
amongst themselves. They decide on the following approach to determine
how much each pirate receives:
The eldest pirate proposes an allocation. All pirates (including the
eldest) then vote on the proposal. If the majority accept the p
100;i++)
{
x1=( ( (a*x0) + c)% m) ;
printf(" %d \n",x1);
x0=x1;
}
}
On 10/5/09, Prabhu Hari Dhanapal wrote:
> hi ,
>
> I think the Linear Congruential Generator is believed to be the most
> simple of all PRNGs.
>
> The sequence can be generated using the following,
>
ne looking at the sequence to notice any
> obvious patterns.
>
> Thanks
>
> >
>
--
Hari
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group,
flow of
water is constricted by the pipe of minimum diameter.
Hope that helps :)
On Wed, Sep 30, 2009 at 9:17 AM, sharad kumar wrote:
> ya something like finding different augmenting paths caluclating the max
> flow.pls refer coreman.
>
> On Wed, Sep 30, 2009 at 1:36 PM,
is to recursively divide the number by 3 and check the
> remainder.
> > > > Is there any other way using bit manipulation or anything else??
> >
> > > > --
> > > > Anshya Aggarwal
> >
> > --
> > Yesterday is History.
> > Tomorrow is a Mystery.
Isn't linear time enough? Go form the begining to the end, whenever a[i] >
a[i+1] you a new subsequence. You can keep track of where each one ends and
then pick the longest.
On 4/15/07, Sachin <[EMAIL PROTECTED]> wrote:
>
>
> http://en.wikipedia.org/wiki/Longest_increasing_subsequence_problem
>
11 matches
Mail list logo