Here are the notes of LeetCode that I finished. LeetCode is a website that full of resource of algorithme and data structer problems. I am trying to complete one or two problem per week to keep me in a status of programming.
In these notes, I will mainly marked down the idea when I try to solve the problem. The programming language I used is Javascript because I think Javascript is easy to use and test: What you need is a node.js and a text editor.
- Make sure that you installed the node which provide a javascript runtime.
$ node -v
- create a file and write/paste the code and save it as a javascript file (example.js)
- use nodejs to run the code and see the result
$ node example.js
- Generaly you can use console.log() as an output for debugging
I suggest to use Sublime text with nodejs that you can complie the javascript on it.
- install the V8 in sublime text
- create a new built system: Tools - system - new built system
- use cmd+B to run the code