摘要:
By given a binary tree, and a root node, find the deepest node of this tree. We have way to create node: Way to create tree: Way to construct tree: Th 阅读全文
摘要:
Let's say given a number of array, you should print out, all the subet of this array. Example: [1, 2] Output: > "" > 1> 2 > 1,2 The number of subset s 阅读全文
摘要:
This post is similar to previous post. The difference is in this post, we are going to see how to handle both successfuly result and error result by u 阅读全文
摘要:
Let's say we are going to read some files, return the first file which pass the prediction method, this prediction method can be just check whether th 阅读全文
摘要:
For example you have a server.js file, and you want to debug some problems; What you can do is: Then go to chrome broswer: You will find node.js targe 阅读全文
摘要:
It might be possible for our node server has some downtime, no matter it is because server update or simply some crashs in the code. We want to minizi 阅读全文
摘要:
Let's see how to do load balancing in Node.js. Before we start with the solution, you can do a test to see the ability concurrent requests your curren 阅读全文
摘要:
When build server, if we have a API endpoint requires some heavy calculation process, it will block the whole world. In this post, we will see how to 阅读全文
摘要:
/**@abstract * Write your own Math.pow(a int, b int) function * */ function pow (a, b) { let result = 0; let nigate = b = 2) { result = isEven ? pow(a, b / 2) * pow(a, b / 2) : a * pow(... 阅读全文
摘要:
cons(a, b) constructs a pair, and car(pair) and cdr(pair) returns the first and last element of that pair. For example, car(cons(3, 4)) returns 3, and 阅读全文