Ad
  • Custom User Avatar
    findOverlapTime(1, 6)
    
    Expected: '13:70', instead got: '01:10'
    
  • Custom User Avatar

    The expected values are nonsensical: 59 should not appear unless n = 60, but it frequently appears:

    Test.assertEquals(findOverlapTime(12,1), "12:00")
    Test.assertEquals(findOverlapTime(11,4), "11:59")
    Test.assertEquals(findOverlapTime(6,1), "06:59")
    

    n = 1 should only have 1 minute hand possibility, at 00 (and for n = 4, at 00, 15, 30, 45). At no point should 59 appear.

    But then, findOverlapTime(10, 6) somehow expects 10:50 instead of 10:59. (10:59 has a smaller angle.)

  • Custom User Avatar

    Initial code signature is wrong: function findOverlapTime (hour) { should be function findOverlapTime (h, n) {