# Monthly Archives: 十二月 2012

## Life should be colorful.

Colorful Week Life should be as colorful as this calend… Read More »

## Algorithm Problem: In-Place Merge Sort

The original merge sort version will take O(n) space, a… Read More »

## LeetCode Problem: Populating Next Right Pointers in Each Node II

The code in the previous article LeetCode Problem: Popu… Read More »

## LeetCode Problem: Populating Next Right Pointers in Each Node, Level traversal of binary tree

It’s easy to doing this by using a queue, doing a… Read More »

## Algorithm Problem: Longest Non-Descending Sub Array or Logest Increasing Subarray, Dynamic programming

The ordinary dynamic programing gives our an algorithm … Read More »

## Algoritm Problem: Add Two Unsigned Integers

To add two unsigned integers, A and B, we can exam a bi… Read More »

## Algorithm Problem:Swap the left and right sub-tree in a binary tree without recursion

Just swap the tree nodes’ left and right child, i… Read More »

## Algorithm Problem:Intersection of Sorted Array

Binary search every element of arr1 in arr0, if find, a… Read More »

## LeetCode Problem:Flatten Binary Tree to Linked List

We can notice that in the flattened tree, each sub node… Read More »

## LeetCode Problem:Distinct Subsequences

(2013-1-5更新了动态规划版本，见下面) 这题有点复杂，一开始拿到都不知道怎么下手。 尝试的路径是： 1… Read More »