数据结构
-
【算法题解】25. 字母异位词分组
这是一道 「简单」 题 https://leetcode.cn/problems/group-anagrams/description/ 题目描述 给你一个字符串数组,…
-
【算法题解】26. 求串联子串的位置
这是一道 「困难」 题来自:https://leetcode.cn/problems/substring-with-concatenation-of-all-words/ 题目 给…
-
【算法题解】27. 实现一个LRU缓存
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/lru-cache/description/ ❞ 题目 请你设计并实现一个满足 「LRU …
-
【算法题解】28. 子集的递归解法
❝ 这是一道 「中等难度」 的题题目来自:https://leetcode.cn/problems/subsets/ ❞ 题目 给你一个整数数组 nums ,数组中的元素 「互不相…
-
【算法题解】29. 组合的递归解法
❝ 这是一道 「中等难度」 的题 https://leetcode.cn/problems/combinations/ ❞ 题目 给定两个整数 n 和 k,返回范围 [1, n] …
-
【算法题解】30. 全排列的递归解法
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/permutations/ ❞ 题目 给定一个不含重复数字的数组 ,返回其 「所有可能的全…
-
【算法题解】31. 翻转二叉树的递归解法
❝ 这是一道 「简单」 题https://leetcode.cn/problems/invert-binary-tree/ ❞ 题目 给你一棵二叉树的根节点 ,翻转这棵二叉树,并返…
-
【算法题解】32. 验证二叉搜索树的递归解发
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/validate-binary-search-tree/ ❞ 题目 给你一个二叉树的根节点…
-
【算法题解】33. 二叉树的最大深度
❝ 这是一道 「简单」 题 https://leetcode.cn/problems/maximum-depth-of-binary-tree/ ❞ 题目 给定一个二叉树,找出其最…
-
【算法题解】34. 二叉树的最小深度
❝ 这是一道 「简单」 题https://leetcode.cn/problems/minimum-depth-of-binary-tree/ ❞ 题目 给定一个二叉树,找出其最小…
-
【算法题解】35. 两两交换链表中的节点
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/swap-nodes-in-pairs/ ❞ 题目 给你一个链表,两两交换其中相邻的节点,…
-
【算法题解】36. 对称二叉树的递归解法
❝ 这是一道 「简单」 题https://leetcode.cn/problems/symmetric-tree/ ❞ 题目 给你一个二叉树的根节点 root , 检查它是否轴对称…
-
【算法题解】37. Pow(x, n)
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/powx-n/ ❞ 题目 实现 ,即计算 x 的整数 n 次幂函数(即,)。 示例 1: …
-
【算法题解】38. 括号的生成
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/generate-parentheses/ ❞ 题目 数字 n 代表生成括号的对数,请你设…
-
【算法题解】39. 子域名访问计数的递归解法
❝ 这是一道 「中等难度」 的题https://leetcode.cn/problems/subdomain-visit-count/ ❞ 题目 网站域名 “̶…
-
【算法题解】40. 数组的度
❝ 这是一道 「简单」 题https://leetcode.cn/problems/degree-of-an-array/ ❞ 题目 给定一个非空且只包含非负数的整数数组 nums…