in reply to Re: Perl Solution to Spotify Programming Puzzle
in thread Perl Solution to Spotify Programming Puzzle

Cool. It's also a lot faster than my version.

[rml@box current]$ time perl BrowserUK.pl sample-input.txt 2 2002 1009 real 0m0.006s user 0m0.002s sys 0m0.004s [rml@box current]$ time perl rml.pl sample-input.txt 2 1009 2002 real 0m0.028s user 0m0.023s sys 0m0.003s
-- C-x C-c

Replies are listed 'Best First'.
Re^3: Perl Solution to Spotify Programming Puzzle
by BrowserUk (Patriarch) on Aug 26, 2011 at 00:08 UTC
    Cool. It's also a lot faster than my version.

    Yes. But unfortunately, fatally flawed.

    I should never try to assess the inherent complexity of a task when approaching my personal shutdown time :) Nor take example solutions as sufficient tests.

    That said, the fix to the approach doesn't seem to be too complicated, though I haven't coded it yet, so that thought might come back to bite me. Maybe I'll get to it once I cleared the non-optional tasks of my day.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.