
数据结构
文章平均质量分 59
HCacm
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
leetcode 454. 4Sum II
相关问题1. Two Sum 15. 3Sum 16. 3Sum Closest 18. 4Sum 454. 4Sum IIDiscription Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k]原创 2017-10-27 14:40:37 · 356 阅读 · 0 评论 -
leetcode 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not us原创 2017-10-09 17:08:23 · 249 阅读 · 0 评论 -
leetcode 23. Merge k Sorted Lists
相关问题Discription Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路最小堆 该题为二路归并的变种,多路归并。使用最小堆结构在log(k)\log(k)时间复杂度内找到当前最小元素。时间复杂度:nlog(k)n\log(k) 空间复杂度原创 2017-10-30 17:06:42 · 261 阅读 · 0 评论 -
leetcode 25. Reverse Nodes in k-Group
相关问题24. Swap Nodes in Pairs 25. Reverse Nodes in k-GroupDiscription Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less原创 2017-10-30 19:48:53 · 249 阅读 · 0 评论