上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 98 下一页
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 el 阅读全文
posted @ 2018-10-30 09:26 Veritas_des_Liberty 阅读(216) 评论(0) 推荐(0)
摘要: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: AC code: time(O(nlongn) space(O(logn)) Runtime: 28 ms, fa 阅读全文
posted @ 2018-10-29 19:05 Veritas_des_Liberty 阅读(183) 评论(0) 推荐(0)
摘要: Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the first elem 阅读全文
posted @ 2018-10-29 15:13 Veritas_des_Liberty 阅读(159) 评论(0) 推荐(0)
摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example: AC code: Runtime: 4 ms, faster tha 阅读全文
posted @ 2018-10-28 21:45 Veritas_des_Liberty 阅读(201) 评论(0) 推荐(0)
摘要: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: AC code: Runtime: 0 ms, faster than 100.00%  阅读全文
posted @ 2018-10-28 21:00 Veritas_des_Liberty 阅读(179) 评论(0) 推荐(0)
摘要: A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty strin 阅读全文
posted @ 2018-10-28 17:58 Veritas_des_Liberty 阅读(216) 评论(0) 推荐(0)
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2018-10-28 16:49 Veritas_des_Liberty 阅读(310) 评论(0) 推荐(0)
摘要: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2018-10-27 21:41 Veritas_des_Liberty 阅读(196) 评论(0) 推荐(0)
摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and num 阅读全文
posted @ 2018-10-26 21:43 Veritas_des_Liberty 阅读(133) 评论(0) 推荐(0)
摘要: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representati 阅读全文
posted @ 2018-10-26 21:24 Veritas_des_Liberty 阅读(197) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 98 下一页