摘要:
Decode WaysA message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded me... 阅读全文
摘要:
Sqrt(x)Implementint sqrt(int x).Compute and return the square root ofx.分析:方案一:遍历0~n, 第一次出现i * i > n,返回 i-1即可。方案二:二分搜索: (1) 当n = 0, 或者 n = 1时,返回 n (2... 阅读全文