Unique Binary Search Trees I && II 解法请见:https://yanjia.li/zh/2019/02/… Given n, how many structu…
分类:LeetCode题目解答
leetcode-7. Reverse Integer
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 思路分析: Have you …
LeetCode | Anagrams
题目: Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in low…
力扣(LeetCode)652
题目地址:https://leetcode-cn.com/probl…题目描述:给定一棵二叉树,返回所有重复的子树。对于同一类的重复子树,你只需要返回其中任意一棵的根结点即可。 两棵树重复是指它们具有相同的结…
[LeetCode] Preimage Size of Factorial Zeroes Function 阶乘零的原像个数函数
Let f(x) be the number of zeroes at the end of x!. (Recall that x! = 1 * 2 * 3 * ..…
LeetCode | LRU Cache
题目: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following…
LeetCode 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You …
77. Combinations
77. Combinations 题目 Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. …
[LeetCode] Remove Invalid Parentheses 移除非法括号
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all po…
[LeetCode] All O`one Data Structure 全O(1)的数据结构
Implement a data structure supporting the following operations: Inc(Key) – Inserts a new k…
[LeetCode] Magical String 神奇字符串
A magical string S consists of only ‘1’ and ‘2’ and obeys the followi…
[LeetCode] Split Array with Equal Sum 分割数组成和相同的子数组
Given an array with n integers, you need to find if there are triplets (i, j, k) which satisfies follow…