摘要:
Implementint sqrt(int x).Compute and return the square root ofx. 1 class Solution { 2 public: 3 int sqrt(int x) { 4 if (x mid) { // 不要用x ... 阅读全文
posted @ 2014-05-21 12:30
小菜刷题史
阅读(114)
评论(0)
推荐(0)
摘要:
Write a function to find the longest common prefix string amongst an array of strings. 1 class Solution { 2 public: 3 string longestCommonPrefix(v... 阅读全文
posted @ 2014-05-21 12:00
小菜刷题史
阅读(112)
评论(0)
推荐(0)
摘要:
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2014-05-21 11:42
小菜刷题史
阅读(184)
评论(0)
推荐(0)
摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文
posted @ 2014-05-21 11:11
小菜刷题史
阅读(147)
评论(0)
推荐(0)
摘要:
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
posted @ 2014-05-21 10:46
小菜刷题史
阅读(108)
评论(0)
推荐(0)

浙公网安备 33010602011771号