摘要:
题目描述 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farth 阅读全文
摘要:
题目描述 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 思路:注意垂直和重叠的点 代码 时间341ms 空间19988k /** * Defini 阅读全文
摘要:
题目描述 Sort a linked list in O(n log n) time using constant space complexity. 思路:时间复杂度为O(nlogn),空间复杂度为常数,用归并排序 在下的代码 时间1162ms 空间27696k /** * Definition 阅读全文