flexcoders] Array Item Counting
Not to be harsh, but this sounds like something my first cs course in
college would have had as an assignment or problem in a homework set.
This has nothing to do with flex...
var A:Array = [15,15,35,35,35,35, 35,55,55,75,95,105,115,115,115];
var B:Array =
- Original Message -
From: "Paul Andrews" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, January 23, 2008 10:47 PM
Subject: Re: [flexcoders] Array Item Counting
> - Original Message -
> From: "jmfillman" <[EMAIL PROTECTED]>
> To:
>
SDK Team
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Andrews
Sent: Wednesday, January 23, 2008 2:48 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Array Item Counting
- Original Message -
From: "jmfillman" <[EMAIL PROTECT
- Original Message -
From: "jmfillman" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, January 23, 2008 10:25 PM
Subject: [flexcoders] Array Item Counting
>I have an array with several dynamically populated numbers. The array
> is then sorted to group identical value
;
for each(var n:Number in A)
{
if(!B[n]) B[n]=1;
else B[n]++;
if(B[n]>maxrun) maxrun=B[n];
}
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Wednesday, January 23, 2008 2:26 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Array Item Count
I have an array with several dynamically populated numbers. The array
is then sorted to group identical values together.
Let's say my array contains the following:[15,15,35,35,35,35,
35,55,55,75,95,105,115,115,115]
What I need to do is get a count of each number, and determine the
highest freq
6 matches
Mail list logo