PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Validating command-line arguments
Date: Friday, 10 Apr 2020, 06:55:01


    > Message Posted By: Unknown
    >
    > I'm having trouble coming up with an efficient way to verify that the
    > characters appearing in INITIAL (counting multiplicities) appear in GOAL.
    > Is there a better way to approach it than doing something like keeping
    > track of the number of occurrences of each ASCII decimal value in an array
    > for both GOAL and INITIAL (where array indexes would be the ASCII decimal
    > values and the value stored at an index would be the count) and then
    > comparing the two arrays at the end?

Yes, but what you propose is good enough.

--Stan-
PREV INDEX NEXT