Unit tests not correct


  • 0
    H

    I wrote a solution using my own min-heap class to do sorting.
    It produces a technically correct solution, but fails the unit tests when there are multiple solutions for a given input.

    For example, if the input is

    [1 1 2 2 3 3 4 9],3

    Then possible solutions are:

    [1 2 3]
    [2 1 3]
    [3 2 1]

    Has anyone found this as well?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.