摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 给一个由n个点组成的2D平面,找出最多的同在一条直线上的点的个数。 共线点的条件是斜率一样,corn 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文