Using the stdout to debug print the solution in the leetcode con
- 时间:2020-09-07 12:03:44
- 分类:网络文摘
- 阅读:189 次
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) —
推荐阅读:寒冷天气吃多了这5类食物会伤及肠胃 萝卜的3种吃法可以防治冬季常见病 食品之辟谣系列:喝豆浆易患乳腺癌 食品之辟谣系列:忽悠美容丰胸减肥的食物 冬季预防食物中毒及中毒后急救措施 四种常见的食物可以排出身体毒素 男人多吃一些香蕉对身体大有好处 冬至时节常吃6种传统食物可补阳防寒 南方黑芝麻糊大肠菌群超标 5批次产品不合格 烹饪技巧之烹调鸡蛋过程中的常见错误
- 评论列表
-
- 添加评论