leetcode
文章平均质量分 61
会打架喝酒的鱼
这个作者很懒,什么都没留下…
展开
-
链表--sort-list
题目:Sort a linked list in O(n log n) time using constant space complexity./** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) ...原创 2018-08-30 23:53:34 · 90 阅读 · 0 评论 -
穷举--max-points-on-a-line
题目:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line./** * Definition for a point. * struct Point { * int x; * int y; * Point() : x(...原创 2018-08-31 00:04:30 · 145 阅读 · 0 评论 -
栈-evaluate-reverse-polish-notation
题目:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.Some examples: ["2", "1", "+", "...原创 2018-08-31 00:06:45 · 106 阅读 · 0 评论 -
树--Minimum Depth of Binary Tree
题目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.class Solution {public: int run(...原创 2018-08-31 00:08:44 · 151 阅读 · 0 评论