RE: how to find missing value.

2005-10-13 Thread Pant, Hridyesh
Thanks a lot john.. -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: 13 October 2005 15:48 To: Perl Beginners Subject: Re: how to find missing value. Pant, Hridyesh wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED] >> >> Jabir Ahmed wr

Re: how to find missing value.

2005-10-13 Thread John W. Krahn
Pant, Hridyesh wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED] >> >> Jabir Ahmed wrote: >> >>>I need to know the best way to get a missing element >>>from an array. >>> >>>i have an array @a of size containing values 1 to 101 >>>with one value missing. >>> >>>eg: @a=qw( 1 2 3 4 5 6 8

Re: how to find missing value.

2005-10-10 Thread Elie De Brauwer
Robin wrote: On Tuesday 11 October 2005 00:54, Suvajit Sengupta wrote: If the array A is a list of consecutive N natural numbers, then missing number,n = Sum of N natural numbers + Sum of the numbers in Array A. That's a nice solution. It can be enhanced slightly with the use of that thing

Re: how to find missing value.

2005-10-10 Thread Robin
On Tuesday 11 October 2005 00:54, Suvajit Sengupta wrote: >   If the array A is a list of consecutive N natural numbers, > then missing number,n = Sum of N natural numbers + Sum of the numbers > in Array A. That's a nice solution. It can be enhanced slightly with the use of that thing that someone

Re: how to find missing value.

2005-10-10 Thread John W. Krahn
Jabir Ahmed wrote: > Hello Hello, > I need to know the best way to get a missing element > from an array. > > i have an array @a of size containing values 1 to 101 > with one value missing. > > eg: @a=qw( 1 2 3 4 5 6 8 9 10 101); > > (the array is not sorted and its only to make it > ea

Re: how to find missing value.

2005-10-10 Thread Suvajit Sengupta
Hi, If the array A is a list of consecutive N natural numbers, then missing number,n = Sum of N natural numbers + Sum of the numbers in Array A. Regards, Suvajit Jabir Ahmed wrote: Hello I need to know the best way to get a missing element from an array. i have an array @a of size contai

how to find missing value.

2005-10-10 Thread Jabir Ahmed
Hello I need to know the best way to get a missing element from an array. i have an array @a of size containing values 1 to 101 with one value missing. eg: @a=qw( 1 2 3 4 5 6 8 9 10 101); (the array is not sorted and its only to make it easier to understand) now i need to find out the mi