摘要: 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 尾巴草 阅读(137) 评论(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 尾巴草 阅读(129) 评论(0) 推荐(0) 编辑