Ad
  • Default User Avatar

    I disagree. An array of the same numbers is sorted, but it is ambiguous what direction it is sorted.

  • Custom User Avatar

    Hi @oznavigator I still think it is wrong.

    This test is passing to me. so I am considering your note. I am almost sure there is something missing. Have you solved this on the php language? maybe a test case converted to php is wrong?

    public function testOnlyOneMiniWin() {
    $this->assertEquals("Winner!", bingo([["BMJN",44]], 1));
    }

  • Default User Avatar

    Note you can only have one mini win per sub array.

  • Custom User Avatar

    It seems to be wrong to me too in PHP Language. All my tests pass and I submit it generate some random series and the expectation seems wrong. I've added a log to see what it was actually passing to understand why it was failing.

    win: 2
    ticket: [["BP",86],["BC",66],["POYGYR",89],["PZ",68],["GPHB",71],["QN",83],["QUOMXQ",79],["ODMMKL",69],["QTI",84]]

    My function is returning Loser because there is just 1 mini-win on this serie and it is expecting 2. The only mini-win on this is ["ODMMKL",69]

    Failed asserting that two strings are equal.
    Expected: 'Winner!'
    Actual : 'Loser!'

    Please let me know if someone else is having same problem.

  • Default User Avatar

    Looks correct to me!

  • Default User Avatar

    Your program will return "yes, ascending" for an array of same numbers while I think that should be a "no".
    Of course the description should've made it clear.

  • Custom User Avatar

    It appears the solutions have a few mistakes. I compared to ascii table and the ones that are getting marked errors are correct.