Ad
  • Custom User Avatar
    [[953, 579, 241, 809, 554, 782, 1, 756, 846]
    [91, 833, 225, 143, 469, 42, 140, 805, 848]
    [811, 256, 613, 444, 490, 974, 159, 196, 389]
    [362, 408, 480, 854, 52, 829, 777, 189, 791]
    [524, 623, 269, 527, 661, 912, 167, 76, 802]
      v
    >[2, 296, 308, 819, 597, 242, 26, 808, 476]
      ^
    [489, 537, 690, 630, 601, 275, 907, 953, 413]
    [222, 444, 162, 102, 762, 262, 808, 507, 728]
    [324, 946, 41, 540, 396, 205, 444, 562, 497]]
    

    Look again, and the index value for 2 is 27.

  • Default User Avatar

    could you please fix your broken test cases
    [[953, 579, 241, 809, 554, 782, 1, 756, 846]
    [91, 833, 225, 143, 469, 42, 140, 805, 848]
    [811, 256, 613, 444, 490, 974, 159, 196, 389]
    [362, 408, 480, 854, 52, 829, 777, 189, 791]
    [524, 623, 269, 527, 661, 912, 167, 76, 802]
    [2, 296, 308, 819, 597, 242, 26, 808, 476]
    [489, 537, 690, 630, 601, 275, 907, 953, 413]
    [222, 444, 162, 102, 762, 262, 808, 507, 728]
    [324, 946, 41, 540, 396, 205, 444, 562, 497]]
    should be sorted to
    [953, 579, 241, 809, 554, 782, 1, 756, 846, 848, 389, 791, 802, 476, 413, 728, 497, 562, 444, 205, 396, 540, 41, 946, 324, 222, 489, 2, 524, 362, 811, 91, 833, 225, 143, 469, 42, 140, 805, 196, 189, 76, 808, 953, 507, 808, 262, 762, 102, 162, 444, 537, 296, 623, 408, 256, 613, 444, 490, 974, 159, 777, 167, 26, 907, 275, 601, 630, 690, 308, 269, 480, 854, 52, 829, 912, 242, 597, 819, 527, 661]

    At index 25 it is expected result to contain the number 2 , whereas from the given array it does not even contain 2

  • Default User Avatar

    Well, I had just created some print statements to track the words... I've since deleted that but you can easily do the same. Also: I did notice that your code fails on other types of test, so give it a thorough look while print/debugging. Best of luck!

  • Default User Avatar

    You have to check '(' and ')' but you can ignore those : {} []

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    is it possible to have some test cases pls

  • Default User Avatar

    Hi junioryao, I have run your code and checked its output. It returned 1 (claiming Bob had won) on a random test wherein neither player could find any match word for the original game word. Tests of this type should return -1.

  • Default User Avatar

    awesome, thanks Jomo!

  • Default User Avatar

    hello , is there any errors on the random test case for java , I dont it how the code fails , as well as all cases in the discussion every case work fine , I dont get it

  • Default User Avatar

    you are right there is a mistake here

  • Default User Avatar