上一页 1 2 3 4 5 6 7 8 ··· 12 下一页

LeetCode-25- Reverse Nodes in k-Group

摘要: 算法描述: 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 than or eq 阅读全文
posted @ 2019-02-11 15:52 无名路人甲 阅读(80) 评论(0) 推荐(0) 编辑

LeetCode-23-Merge k Sorted Lists

摘要: 算法描述: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 解题思路:分治法。 阅读全文
posted @ 2019-02-11 10:58 无名路人甲 阅读(77) 评论(0) 推荐(0) 编辑

LeetCode-10-Regular Expression Matching

摘要: 算法描述: Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. The matching should cover the e 阅读全文
posted @ 2019-02-11 10:29 无名路人甲 阅读(113) 评论(0) 推荐(0) 编辑

LeetCode-4-Median of Two Sorted Arrays

摘要: 算法描述: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complex 阅读全文
posted @ 2019-02-11 09:21 无名路人甲 阅读(94) 评论(0) 推荐(0) 编辑

LeetCode-153-Find Minimum in Rotated Sorted Array

摘要: 算法描述: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1, 阅读全文
posted @ 2019-02-07 10:39 无名路人甲 阅读(89) 评论(0) 推荐(0) 编辑

LeetCode-152-Maximum Product Subarray

摘要: 算法描述: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Exampl 阅读全文
posted @ 2019-02-07 10:08 无名路人甲 阅读(83) 评论(0) 推荐(0) 编辑

LeetCode-151-Reverse Words in s String

摘要: 算法描述: Given an input string, reverse the string word by word. Example: Note: A word is defined as a sequence of non-space characters. Input string may 阅读全文
posted @ 2019-02-07 09:46 无名路人甲 阅读(79) 评论(0) 推荐(0) 编辑

LeetCode-150-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 ano 阅读全文
posted @ 2019-02-06 21:38 无名路人甲 阅读(79) 评论(0) 推荐(0) 编辑

LeetCode-148-Sort List

摘要: 算法描述: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 解题思路:时间复杂度O(nlogn)。写了快排感觉很奇怪,看了其他人答案,发现都是归并排序。 快排代码 阅读全文
posted @ 2019-02-06 21:22 无名路人甲 阅读(94) 评论(0) 推荐(0) 编辑

LeetCode-147-Insertion Sort List

摘要: 算法描述: Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the firs 阅读全文
posted @ 2019-02-06 19:46 无名路人甲 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页