Using the stdout to debug print the solution in the leetcode con
- 时间:2020-09-07 12:03:44
- 分类:网络文摘
- 阅读:167 次
The leetcode web coding IDE has a premium debugger feature – however this is not enabled during the contest. Recently I found out that you can actually print to STDOUT and then when you run your solution – you will see the output – this is an easy yet powerful method to debug when you don’t have other better solutions.

leetcode-stdout-debugging-trick
This is a great way to debug your code when you don’t have a IDE at hand – sometimes I participated the weekly contests on iPad where I don’t have IDE and I don’t have access to the inbuilt leetcode debugger as well – in this case, the printing to stdout is the only practical way of debugging printing the variables. Prior to this, I can only change the code and return the variable as a debugging technique – which is very inefficient.

leetcode
–EOF (The Ultimate Computing & Technology Blog) —
推荐阅读:关于比的应用题练习 和自然数有关的数学题 数学题:下图中圆的面积和长方形的面积相等 数学题:小王没事就用计算器计算从1加到100的结果 数学题:何时换轮胎 数学题:甲乙分别知道两数之和两数之积求这两个数 数学题:两队合修4天后,还剩下5000米 数学题:如右图,O是圆心,图中三角形的面积是5平方厘米,求圆的面积 数学题:一块长方形铁皮 数学题:王老师用一些钱给学生买奖品
- 评论列表
-
- 添加评论