上一页 1 2 3 4 5 6 7 8 ··· 23 下一页
摘要: Problem: Implement pow(x, n). Subscribe to see which companies asked this question 考虑到指数为负的情况 利用二分来求结果 时间复杂度O(logn) 1 class Solution { 2 public: 3 dou 阅读全文
posted @ 2016-02-29 17:25 尾巴草 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Problem: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. Subscribe to see which companie 阅读全文
posted @ 2016-02-29 16:38 尾巴草 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Prolem: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. Subscribe to see which companies asked this 阅读全文
posted @ 2016-02-29 16:17 尾巴草 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Subscribe to see which companies asked thi 阅读全文
posted @ 2016-02-29 09:06 尾巴草 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Problem: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inser 阅读全文
posted @ 2016-02-28 16:24 尾巴草 阅读(164) 评论(0) 推荐(0) 编辑
摘要: problem: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number mus 阅读全文
posted @ 2016-02-28 16:15 尾巴草 阅读(148) 评论(0) 推荐(0) 编辑
摘要: problem: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two 阅读全文
posted @ 2016-02-28 15:49 尾巴草 阅读(194) 评论(0) 推荐(0) 编辑
摘要: problem: 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 betwee 阅读全文
posted @ 2016-02-02 20:21 尾巴草 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Problem:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum el... 阅读全文
posted @ 2016-01-20 21:59 尾巴草 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Problem:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a tar... 阅读全文
posted @ 2016-01-20 21:25 尾巴草 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 23 下一页