V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Alpacino
V2EX  ›  问与答

LeetCode 148. Sort List maximum recursion depth exceeded

  •  
  •   Alpacino · Apr 8, 2019 · 1941 views
    This topic created in 2575 days ago, the information mentioned may be changed or developed.

    请问各位这题 TOPDOWN,用 divide and conquer ( recursive)一定会 maximum recursion depth exceeded 吗? PYTHON3

    2 replies    2019-04-08 23:13:46 +08:00
    saluton
        1
    saluton  
       Apr 8, 2019
    试了一下,python3 可以 A 掉,输出下分开后两个 list 的长度,看看是不是死循环了
    Alpacino
        2
    Alpacino  
    OP
       Apr 8, 2019
    @saluton 谢谢,已解决。。我递归终止条件没写对。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   870 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 22:02 · PVG 06:02 · LAX 15:02 · JFK 18:02
    ♥ Do have faith in what you're doing.