上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 76 下一页
摘要: Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input 阅读全文
posted @ 2019-11-09 09:41 Schwifty 阅读(151) 评论(0) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2019-11-09 05:54 Schwifty 阅读(124) 评论(0) 推荐(0)
摘要: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2019-11-09 03:27 Schwifty 阅读(129) 评论(0) 推荐(0)
摘要: Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tick 阅读全文
posted @ 2019-11-08 04:32 Schwifty 阅读(141) 评论(0) 推荐(0)
摘要: Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do 阅读全文
posted @ 2019-11-07 12:00 Schwifty 阅读(140) 评论(0) 推荐(0)
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2019-11-07 11:25 Schwifty 阅读(115) 评论(0) 推荐(0)
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2019-11-06 11:34 Schwifty 阅读(131) 评论(0) 推荐(0)
摘要: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time 阅读全文
posted @ 2019-11-06 05:14 Schwifty 阅读(101) 评论(0) 推荐(0)
摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2019-11-06 04:29 Schwifty 阅读(93) 评论(0) 推荐(0)
摘要: Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] 阅读全文
posted @ 2019-11-05 14:05 Schwifty 阅读(105) 评论(0) 推荐(0)
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 76 下一页