Using the stdout to debug print the solution in the leetcode con

  • Time:2020-09-07 12:03:44
  • Class:Weblog
  • Read:29

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 Using the stdout to debug print the solution in the leetcode contest leetcode online judge

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 Using the stdout to debug print the solution in the leetcode contest leetcode online judge

leetcode

–EOF (The Ultimate Computing & Technology Blog) —

Recommend:
How to Write Fresh Blog Content After Years on the Job
5 Clean Energy Blogs to Read in 2019
Social Media is Dying. Here are 3 Ways to Hack it for More Traff
5 Skills All Successful Content Writers Have Mastered
Blogging for Dummies in 2019: The Only Cheat Sheet You Need
Are Readers Reaching Your Call To Action?
How to Manage a Content Marketing Plan for Your Blog
4 Simple Techniques To Bring Your Dead Blog Back To Life
How to Earn Bitcoin Through Blogging
5 PayPal Alternatives for Bloggers and Solopreneurs
Share:Facebook Twitter
Comment list
Comment add