Alpacino
V2EX  ›  问与答

LeetCode 148. Sort List maximum recursion depth exceeded

  •  
  •   Alpacino · Apr 8, 2019 · 2438 views
    This topic created in 2771 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
    saluton
    Apr 8, 2019
    1
    试了一下,python3 可以 A 掉,输出下分开后两个 list 的长度,看看是不是死循环了
    Alpacino
    Alpacino
    OP
    Apr 8, 2019
    2
    @saluton 谢谢,已解决。。我递归终止条件没写对。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1479 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:19 · PVG 09:19 · LAX 17:19 · JFK 20:19
    ♥ Do have faith in what you're doing.