单步调试调试leetcode代码 | 您所在的位置:网站首页 › pycharm刷leetcode › 单步调试调试leetcode代码 |
单步调试调试leetcode代码
LeetCode代码通过Playground获取调试代码,然后通过赋值代码到本地的Pycharm进行单步调试
概述
LeetCode有三种Playground:控制台Playground:链表(Linked list),树(Binary tree);前端程序:React。LeetCode里面的Playground调试只能通过stdin输入实例,执行调试之后直接就获得输入结果。通过复制粘贴Playground代码到Pycharm可以进行单步调试。不同的控制台Playground调试过程类似,本文以104. 二叉树的最大深度中的树(Binary tree)的控制台Playground和Pycharm进行单步执行从而调试自己写的代码。 一、选择语言,输入调试代码 python3的不需要decode了,因为python3的str没有decode的这个属性了,直接删除! def stringToString(input): return input[1:-1].decode('string_escape')修改为: def stringToString(input): return input[1:-1]
|
CopyRight 2018-2019 实验室设备网 版权所有 |