Difference: LabKenyon (9 vs. 10)

Revision 102017-03-28 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Line: 42 to 41
 

Hints

  1. Don't try to code this program until you work out an algorithm on paper, and can manually step through it on paper!
  2. It is MUCH easier to count the number of occurances if you sort the numbers first, then do the counting.
Changed:
<
<
  1. Use additional arrays to store the unique numbers found, and the matching counts for each of those unique numbers.
>
>
  1. You could use additional arrays to store the unique numbers found, and the matching counts for each of those unique numbers. There is a more efficent method without using extra arrays.
 
  1. You will need to break this up into functions. Do no attempt to do it all in a single program. Some likely functions:
Added:
>
>
    • Enter Array
 
    • Sort array of integers (given array)
Changed:
<
<
    • Display solution table (given arrays)
    • Tally numbers in an array
>
>
    • Display solution table using the sorrted array
    • Tally numbers in an array (only if you create intermediate arrays)
 

Turn In

Runs of the following:

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback