上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 54 下一页
摘要: Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. Examp 阅读全文
posted @ 2019-07-19 13:43 北叶青藤 阅读(247) 评论(0) 推荐(0)
摘要: Given a rows x cols screen and a sentence represented by a list of words, find how many times the given sentence can be fitted on the screen. Note: A 阅读全文
posted @ 2019-07-18 12:58 北叶青藤 阅读(223) 评论(0) 推荐(0)
摘要: Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. A subsequence of a str 阅读全文
posted @ 2019-07-18 12:01 北叶青藤 阅读(285) 评论(0) 推荐(0)
摘要: On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0. A move consists of choosing 0 and a 4 阅读全文
posted @ 2019-07-17 14:05 北叶青藤 阅读(278) 评论(0) 推荐(0)
摘要: Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: getand put. get(key) - Get th 阅读全文
posted @ 2019-07-17 12:48 北叶青藤 阅读(235) 评论(0) 推荐(0)
摘要: Given a positive integer N, how many ways can we write it as a sum of consecutive positive integers? Example 1: Example 2: Example 3: 分析:https://leetc 阅读全文
posted @ 2019-07-15 11:09 北叶青藤 阅读(314) 评论(0) 推荐(0)
摘要: Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions: put(key, value) : Insert 阅读全文
posted @ 2019-07-15 10:54 北叶青藤 阅读(216) 评论(0) 推荐(0)
摘要: Given an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in proport 阅读全文
posted @ 2019-07-15 09:19 北叶青藤 阅读(112) 评论(0) 推荐(0)
摘要: Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order. Return the intersection of these two interval li 阅读全文
posted @ 2019-07-15 09:03 北叶青藤 阅读(375) 评论(0) 推荐(0)
摘要: Design a search autocomplete system for a search engine. Users may input a sentence (at least one word and end with a special character '#'). For each 阅读全文
posted @ 2019-07-15 05:34 北叶青藤 阅读(525) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 54 下一页