摘要:
题目描述:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of th... 阅读全文
摘要:
题目描述:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.解题思路:题目说的非常清楚,寻找二维点在一条直线上的最大数目。思路一: 首先想到的方式就是直接... 阅读全文
摘要:
题目描述: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 l... 阅读全文
摘要:
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... 阅读全文