上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 29 下一页
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文
posted @ 2017-11-15 13:48 jasminemzy 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2017-11-15 10:13 jasminemzy 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find 阅读全文
posted @ 2017-11-15 08:23 jasminemzy 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2017-11-15 06:48 jasminemzy 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up 阅读全文
posted @ 2017-11-15 04:33 jasminemzy 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], 阅读全文
posted @ 2017-11-15 03:55 jasminemzy 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2017-11-15 02:17 jasminemzy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 考数学和抠细节。O(n2)。每对点都要遍历。先固定第一个点,从第一个点开始跟后面每个点计算斜率,存到 阅读全文
posted @ 2017-11-12 14:56 jasminemzy 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2017-11-12 09:57 jasminemzy 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文
posted @ 2017-11-12 08:19 jasminemzy 阅读(147) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 29 下一页