随笔分类 -  排序

摘要:Merge Sorted Array 题解 题目来源:https://leetcode.com/problems/merge sorted array/description/ Description Given two sorted integer arrays nums1 and nums2, 阅读全文
posted @ 2018-02-06 13:14 言何午 阅读(97) 评论(0) 推荐(0)
摘要:归并排序 递归版 c++ include using namespace std; // reg 是临时存储归并结果的数组 void merge(int arr, int reg, int start, int end) { if (start = end) return; int left = s 阅读全文
posted @ 2018-01-13 13:10 言何午 阅读(206) 评论(0) 推荐(0)
摘要:Insertion Sort List 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/insertion sort list/description/ Description Sort a linked list using insertion so 阅读全文
posted @ 2017-12-20 17:39 言何午 阅读(116) 评论(0) 推荐(0)
摘要:Kth Largest Element in an Array 题解 题目来源:https://leetcode.com/problems/kth largest element in an array/description/ Description Find the kth largest el 阅读全文
posted @ 2017-11-18 17:37 言何午 阅读(115) 评论(0) 推荐(0)
摘要:H Index题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/h index/description/ Description Given an array of citations (each citation is a non negative i 阅读全文
posted @ 2017-09-29 21:04 言何午 阅读(147) 评论(0) 推荐(0)
摘要:Merge Two Sorted Lists题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/merge two sorted lists/description/ Description Merge two sorted linked lists an 阅读全文
posted @ 2017-09-29 10:24 言何午 阅读(102) 评论(0) 推荐(0)
摘要:Course Schedule II题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/course schedule ii/description/ Description There are a total of n courses you have 阅读全文
posted @ 2017-09-29 09:15 言何午 阅读(110) 评论(0) 推荐(0)
摘要:Course Schedule题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/course schedule/description/ Description There are a total of n courses you have to tak 阅读全文
posted @ 2017-09-24 22:18 言何午 阅读(193) 评论(0) 推荐(0)
摘要:Sort List题解 题目来源:https://leetcode.com/problems/sort list/description/ Description Sort a linked list in O(n log n) time using constant space complexit 阅读全文
posted @ 2017-09-17 16:54 言何午 阅读(139) 评论(0) 推荐(0)
摘要:Sort Colors题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/sort colors/description/ Description Given an array with n objects colored red, white or bl 阅读全文
posted @ 2017-09-17 11:09 言何午 阅读(90) 评论(0) 推荐(0)
摘要:Merge Intervals题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/merge intervals/description/ Description Given a collection of intervals, merge all ove 阅读全文
posted @ 2017-09-15 11:13 言何午 阅读(98) 评论(0) 推荐(0)