in reply to Re^2: Faster (but uglier) PWC 350-2 solutions
in thread Faster (but uglier) PWC 350-2 solutions

> but in different orders.

My bad, I stand corrected. But writing A < B from the beginning would have been better.

> Namely, in Example 4,

does only give the number of occurrences not that explicit result you showed.

Without calculating the numbers for both interpretations, it's not possible to tell which one is right, if you suspect that the wording is flawed.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Faster (but uglier) PWC 350-2 solutions
by choroba (Cardinal) on Dec 09, 2025 at 16:56 UTC
    > But writing A < B from the beginning would have been better.

    That would need me to think about it more than I did. ;-)

    > Without calculating the numbers for both interpretations, it's not possible

    That's how the Weekly Challenge often works. Sometimes, even the examples don't give enough clues and people come with different interpretations. That's part of the fun.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        > What you wrote has no solution. ;)

        It was fixed after a short while.

        > (FWIW I would have chosen B = A * k )

        Mohammad will be happy if you submit anything!

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]