摘要: 题目描述 Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i 阅读全文
posted @ 2019-06-24 14:44 你好哇傻小妞 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are 阅读全文
posted @ 2019-06-21 16:37 你好哇傻小妞 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination shoul 阅读全文
posted @ 2019-06-20 14:17 你好哇傻小妞 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you 阅读全文
posted @ 2019-06-19 16:48 你好哇傻小妞 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially 阅读全文
posted @ 2019-06-19 15:08 你好哇傻小妞 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string contain 阅读全文
posted @ 2019-06-19 11:36 你好哇傻小妞 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目描述 There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you hav 阅读全文
posted @ 2019-06-18 22:15 你好哇傻小妞 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there i 阅读全文
posted @ 2019-06-13 15:12 你好哇傻小妞 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Implement a trie with insert, search, and startsWith methods. 题目大意 实现对一棵树的插入、搜索以及前序查找操作。 (树的每个节点代表一个小写字母,从根节点到叶节点代表一个完整的单词) 示例 E Trie trie = new 阅读全文
posted @ 2019-06-13 14:28 你好哇傻小妞 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题目描述 There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you hav 阅读全文
posted @ 2019-06-12 16:57 你好哇傻小妞 阅读(111) 评论(0) 推荐(0) 编辑