Given a Weather table, write a SQL query to find all dates’ Ids with higher temperature…
分类:LeetCode题目解答
[LeetCode] Delete Operation for Two Strings 两个字符串的删除操作
Given two words word1 and word2, find the minimum number of steps required to make …
[LeetCode] Minimum Distance Between BST Nodes 二叉搜索树中结点的最小距离
Given a Binary Search Tree (BST) with the root node root, return the minimum difference betwe…
187. Repeated DNA Sequences
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG…
LeetCode 16. 3Sum Closest
题目 给一个包含 n 个整数的数组 S, 找到和与给定整数 target 最接近的三元组,返回这三个数的和。 注意事项 只需要返回三元组之和,无需返回三元组本身 样例 例如 S = [-1, 2, 1, -4] and …
[LeetCode] H-Index II 求H指数之二,H-Index 求H指数
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize you…
[LeetCode] Largest Divisible Subset 最大可整除的子集合
Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of ele…
LeetCode 001 Two Sum
题目描述 Given an array of integers, find two numbers such that they add up to a specific target number. The funct…
[LeetCode] Encode and Decode Strings 加码解码字符串
Design an algorithm to encode a list of strings to a string. The encoded string is then …
[LeetCode] 132 Pattern 132模式
Given a sequence of n integers a1, a2, …, an, a 132 pattern is a subsequence ai, aj, ak such…
150. Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each…
[Leetcode] H-Index H指数
H-Index I Given an array of citations (each citation is a non-negative integer) of a researcher, write a funct…