- 博客(4)
- 收藏
- 关注
原创 【LeetCode】295.寻找数据流中的中位数
295. Find Median from Data Stream Description: 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 the two m...
2019-04-15 15:47:22 506
原创 【LeetCode】23.K个有序链表合并
23. Merge k Sorted Lists Description: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Difficulty:hard Example: Input: [ 1->4->5, 1->3-&...
2019-04-12 15:38:43 323
原创 【LeetCode】145. 二叉树后续遍历
102. Binary Tree Postorder Traversal Description: Given a binary tree, return the postorder traversal of its nodes’ values. Difficulty:hard Example: Input: [1,null,2,3] 1 \ 2 / 3 ...
2019-04-12 13:14:33 355
原创 C++ heap堆的使用
堆的基本操作 make_heap() == 默认最大堆,最小堆加参数greater< int >() == pop_heap() == 先pop,然后在容器中删除 == push_heap() == 先在容器中加入,再push == sort_heap() #include<iostream> #include<vector> #include<alg...
2019-04-12 11:25:34 2716
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人