Monthly Archives: February 2017

Binary Search
Leave a commentFebruary 26, 2017 by oneOokay
真的是直到今天才完完全全弄明白… 参考:http://blog.csdn.net/ebowtang/article/details/50770315 首先每个人的二分法都有自己的方式来确定mid,我的习惯使用的是 mid = start + (end – start) / 2 与mid = (start + end) / 2相比的优点是: 当start和end为非常大的正数的时候,不会overflow. …
Continue reading 
Decode Ways
Leave a commentFebruary 21, 2017 by oneOokay
A message containing letters from AZ is being encoded to numbers using the following mapping: ‘A’ > 1 ‘B’ > …
Continue reading 
Factor Combinations
Leave a commentFebruary 20, 2017 by oneOokay
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 …
Continue reading 
Delete Node in a BST
Leave a commentFebruary 17, 2017 by oneOokay
Given a root node reference of a BST and a key, delete the node with the given key in the …
Continue reading 
Roman to Integer/Integer to Roman
Leave a commentFebruary 13, 2017 by oneOokay
roman numerals chart http://literacy.kent.edu/Minigrants/Cinci/romanchart.htm 罗马字表: I = 1; V = 5; X = 10; L = 50; C = 100; …
Continue reading 
Excel Sheet Column Title/Number
Leave a commentFebruary 13, 2017 by oneOokay
啊 我发现我竟然不太会进制转化… Excel Sheet Column Title Given a positive integer, return its corresponding column title as appear in an Excel …
Continue reading 
Word Pattern II
Leave a commentFebruary 13, 2017 by oneOokay
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, …
Continue reading