摘要:
题目描述 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 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string contain 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 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 阅读全文
摘要:
题目描述 Implement a trie with insert, search, and startsWith methods. 题目大意 实现对一棵树的插入、搜索以及前序查找操作。 (树的每个节点代表一个小写字母,从根节点到叶节点代表一个完整的单词) 示例 E Trie trie = new 阅读全文
摘要:
题目描述 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 阅读全文