Daily Archives: October 11, 2015


Word Pattern I && II

Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Examples: pattern = “abba”, str = “dog cat cat dog” should return true. […]


[lintcode] Expression Tree Build

Expression Tree Build The structure of Expression Tree is a binary tree to evaluate certain expressions. All leaves of the Expression Tree have an number string value. All non-leaves of the Expression Tree have an operator string value. Now, given an expression array, build the expression tree of this expression, […]