上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 68 下一页
摘要: 题目如下: Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstu 阅读全文
posted @ 2019-03-21 22:29 seyjs 阅读(275) 评论(0) 推荐(0)
摘要: 题目如下: Given an array of unique integers, each integer is strictly greater than 1. We make a binary tree using these integers and each number may be us 阅读全文
posted @ 2019-03-20 16:28 seyjs 阅读(237) 评论(0) 推荐(0)
摘要: 题目如下: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nodes, only nod 阅读全文
posted @ 2019-03-19 17:13 seyjs 阅读(220) 评论(0) 推荐(0)
摘要: 题目如下: A conveyor belt has packages that must be shipped from one port to another within D days. The i-th package on the conveyor belt has a weight of  阅读全文
posted @ 2019-03-19 17:09 seyjs 阅读(377) 评论(0) 推荐(0)
摘要: 题目如下: In a list of songs, the i-th song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration in secon 阅读全文
posted @ 2019-03-19 17:00 seyjs 阅读(373) 评论(0) 推荐(0)
摘要: 题目如下: Every non-negative integer N has a binary representation. For example, 5 can be represented as "101" in binary, 11 as "1011" in binary, and so o 阅读全文
posted @ 2019-03-19 16:54 seyjs 阅读(349) 评论(0) 推荐(0)
摘要: 题目如下: Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node t 阅读全文
posted @ 2019-03-18 22:41 seyjs 阅读(114) 评论(0) 推荐(0)
摘要: 题目如下: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 解题思路:因为题目要求时间复杂度是O(nlogn),所以快排应该是合适的方法。原理也和快速排序差不多, 阅读全文
posted @ 2019-03-18 16:21 seyjs 阅读(127) 评论(0) 推荐(0)
摘要: 题目如下: Given a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups 阅读全文
posted @ 2019-03-15 16:37 seyjs 阅读(158) 评论(0) 推荐(0)
摘要: 题目如下: Return the root node of a binary search tree that matches the given preorder traversal. (Recall that a binary search tree is a binary tree where 阅读全文
posted @ 2019-03-14 22:32 seyjs 阅读(353) 评论(0) 推荐(0)
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 68 下一页