the inputArray is: {5,8} your solution return ":58" but it should return "-1" because we don't have valid digits to create "Hour", if we have {0,5,8} then we can create "08:58". (we need an additional 0 or 1)
(I have explained this situation on Example 3)
if the inputArray is: {8,5,8}, because we don't have 0 or 1 to create our "Hour" it should return "-1".
PERFECT :D
I fixed that "00:00" time, and added "00:00" as valid time.
I think you're right, there wasn't any logic behind that constraint, I've added "00:00" as valid🙏
I've added "00:00" as valid🙏
I've added "00:00" as valid🙏
sorry for any inconvenience🙏, this was my first Kata :D I should consider random test cases before publishing, Thank you for your help🙌
for your solution, for example:
the inputArray is: {5,8} your solution return ":58" but it should return "-1" because we don't have valid digits to create "Hour", if we have {0,5,8} then we can create "08:58". (we need an additional 0 or 1)
(I have explained this situation on Example 3)
if the inputArray is: {8,5,8}, because we don't have 0 or 1 to create our "Hour" it should return "-1".
Thanks a lot, I've fixed that.
I have added random tests to the Kata.
I love it