Build personal blog with Hexo Part 2
Part 2: Deploy to GitHubConfigure GitHub In the upper-right corner of any page, click +, and then click New repository. Enter name for your blog project, which must be following this pattern: <us
Part 2: Deploy to GitHubConfigure GitHub In the upper-right corner of any page, click +, and then click New repository. Enter name for your blog project, which must be following this pattern: <us
Part 1: Install HexoPrefaceBuilding personal blogs has never been easier. There are a lot of good choices, free of charge, like blogspot, Sina blog, wordpress.com, etc. But I want something clean, se
Setup the circuitry and program for Interfacing an LED and Switch with Raspberry PiCircuit Diagram: Code:12345678910111213141516171819202122232425from time import sleepimport RPi.GPIO as GPIO GPIO.se
When I was thinking about the problem Validate Binary Search Tree, my code runs like this: 12345678910111213141516171819public boolean isValidBST(TreeNode root) { TreeNode previous = null;
When doing LeetCode problems, some corner cases should be considered when traversing through the tree, otherwise unexpected errors shall appear. Examples:Symmetric TreeSame Tree The following code tak
Let’s think about this problem: Sum Root to Leaf Numbers. A general solution is like below:123456789101112131415161718192021222324252627282930313233public int sumNumbers(TreeNode root) { if (
Imagine we need to compress a string “1111422311” into “4114221321”, which means “four ones, one four, two twos, one three, two ones”. Here is the implementation for this functionality:123456789101112
Breadth-First Traversal can be used in many places, such as traversing level-by-level in a binary tree, or BFS in a graph. All those are implemented with a Queue.Binary Tree Level Order TraversalBinar
Some problem are using this template with minor alternation, such as:Quick SortPartition ArraySort Letters by CaseSort Colors 1234567891011121314151617181920212223242526272829303132333435public int pa