How long is considered to be long enough to report a TLE error ?


  • 0
    A

    I understand that the optimal solution is using DP and the time complexity is O(n^2).

    But I wrote a recursive solution and used hashset to filter the redundant subproblems.
    I tested the TLE test case and my code can solve it using about 107ms.
    I just want to know what is the leetcode's standard for determine whether a program is a TLE ?

    The testcase I used is below.
    String s1 = "baababbabbababbaaababbbbbbbbbbbaabaabaaaabaaabbaaabaaaababaabaaabaabbbbaabbaabaabbbbabbbababbaaaabab";

    String s2 = "aababaaabbbababababaabbbababaababbababbbbabbbbbababbbabaaaaabaaabbabbaaabbababbaaaababaababbbbabbbbb";

    String s3 = "babbabbabbababbaaababbbbaababbaabbbbabbbbbaaabbabaababaabaaabaabbbaaaabbabbaaaaabbabbaabaaaabbbbababbbababbabaabababbababaaaaaabbababaaabbaabbbbaaaaabbbaaabbbabbbbaaabaababbaabababbbbababbaaabbbabbbab";


Log in to reply
 

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