in reply to Re: Count # of occurrences per column
in thread Count # of occurrences per column

The column number off by two in your output. The count and character order is reversed in your output. And while it's not clear from the OP, it looks to me the output should be sorted by descending count.

  • Comment on Re^2: Count # of occurrences per column

Replies are listed 'Best First'.
Re^3: Count # of occurrences per column
by wind (Priest) on May 11, 2011 at 18:40 UTC

    True, but ... from OP:

    The output does not need to be as specific as I have put, as long as it gives the column number and how many occurrences of each character.

    I prefer to simply demonstrate general concepts and not distract with needless or potentially implied minutia. Obviously it's easy enough for the OP to add 2 to the column if that's what he desires, along with adding sorting or pretty printing.

    *Shrug* Good thing I'm not a perfectionist ;)