上一页 1 2 3 4 5 6 7 ··· 46 下一页
  2018年3月26日
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. 思路还是比较简单的,在中 阅读全文
posted @ 2018-03-26 22:04 Beserious 阅读(104) 评论(0) 推荐(0) 编辑
  2018年3月23日
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2018-03-23 23:55 Beserious 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Your are given an array of integers prices, for which the i th element is the price of a given stock on day i; and a non negative integer fee represen 阅读全文
posted @ 2018-03-23 23:47 Beserious 阅读(249) 评论(0) 推荐(0) 编辑
  2018年3月21日
摘要: Given a string containing just the characters and , find the length of the longest valid (well formed) parentheses substring. For , the longest valid 阅读全文
posted @ 2018-03-21 21:24 Beserious 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or 阅读全文
posted @ 2018-03-21 21:06 Beserious 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element 阅读全文
posted @ 2018-03-21 20:16 Beserious 阅读(129) 评论(0) 推荐(0) 编辑
  2018年3月17日
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height balanced bina 阅读全文
posted @ 2018-03-17 10:27 Beserious 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. 思路:用map维护区间内各个字母的数量,然后遇到已经访问过的就进行滑动区间,来得到符合条件的区间,然后求最大区间长度。 虽然时 阅读全文
posted @ 2018-03-17 10:21 Beserious 阅读(121) 评论(0) 推荐(0) 编辑
  2018年3月13日
摘要: Given n non negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文
posted @ 2018-03-13 22:36 Beserious 阅读(143) 评论(0) 推荐(0) 编辑
  2018年3月12日
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2018-03-12 20:36 Beserious 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 46 下一页