+ 1

Last solution

I encountered a problem with my last solution for the Poker Hand challenge on SoloLearn. I tried my best to solve it, and all the test cases are passing except for the 6th one. I'm not sure why it's failing. Can someone help me figure it out? https://sololearn.com/compiler-playground/cTycf4iZM65l/?ref=app I rewrote the same code in Python, but I'm still facing the same issue as before. I suspect the problem might be related to the order of the output conditions

11th Oct 2024, 4:21 PM
LORD HOSSEIN
LORD HOSSEIN - avatar
2 Réponses
+ 2
The mistake in the code is in the way the values of the cards are extracted. The current implementation assumes that the value of the card is always a single character (e.g., '2', '3', 'J', 'Q', etc.), but for the value '10', it will only take the first character '1' instead of '10'. 5d 6d 7d 8d 9d - works 10d 6d 7d 8d 9d - does not work
11th Oct 2024, 6:08 PM
Jerry Hobby
Jerry Hobby - avatar
+ 1
Jerry Hobby You're genius bro Thanks
12th Oct 2024, 3:28 AM
LORD HOSSEIN
LORD HOSSEIN - avatar