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));
}
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.
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.
I disagree. An array of the same numbers is sorted, but it is ambiguous what direction it is sorted.
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));
}
Note you can only have one mini win per sub array.
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.
Looks correct to me!
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.
It appears the solutions have a few mistakes. I compared to ascii table and the ones that are getting marked errors are correct.