摘要: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except  阅读全文
posted @ 2018-03-16 09:04 轻风舞动 阅读(369) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2018-03-16 08:35 轻风舞动 阅读(581) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2018-03-16 08:23 轻风舞动 阅读(681) 评论(0) 推荐(0) 编辑
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 给一个由n个点组成的2D平面,找出最多的同在一条直线上的点的个数。 共线点的条件是斜率一样,corn 阅读全文
posted @ 2018-03-16 07:37 轻风舞动 阅读(495) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator to flatten a 2d vector. For example,Given 2d vector = By calling next repeatedly until hasNext returns false, the order of eleme 阅读全文
posted @ 2018-03-16 07:20 轻风舞动 阅读(1131) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2018-03-16 05:45 轻风舞动 阅读(6104) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all mee 阅读全文
posted @ 2018-03-16 05:43 轻风舞动 阅读(1399) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2018-03-16 04:26 轻风舞动 阅读(777) 评论(0) 推荐(0) 编辑