数据结构
-
【算法题解】9. 邻值查找
这是一道中等难度的题 题目来自:https://www.acwing.com/problem/content/description/138/ 题目 给定一个长度为 n 的序列 A…
-
【算法题解】10. 判断链表是否有环
这是一道简单题。 题目来自:https://leetcode.cn/problems/linked-list-cycle/description/ 题目 给你一个链表的头节点&nb…
-
【算法题解】11. 判断链表是否有环,并返回入环节点
这是一道 中等难度 的题,是基于 【算法题解】10. 判断链表是否有环 的扩展。 题目来自:https://leetcode.cn/prob…
-
【算法题解】12. 删除链表中的节点
这是一道简单题。 题目来自:https://leetcode.cn/problems/delete-node-in-a-linked-list/description/ 题目 给定…
-
【算法题解】13. 删除链表的倒数第 N 个结点
这是一道 中等难度 题。 题目来自:https://leetcode.cn/problems/remove-nth-node-from-end-of-list/…
-
【算法题解】14. 有效的括号
这是一道 简单 题。 来自:https://leetcode.cn/problems/valid-parentheses/solutions/ 题目 给定一个只…
-
【算法题解】15. 设计最小栈
这是一道 中等难度 的题。 题目来自:https://leetcode.cn/problems/min-stack/ 题目 设计一个支持 push ,pop&n…
-
【算法题解】16. 逆波兰表达式(后缀表达式)求值
这是一道 中等难度 的题。 题目来自:https://leetcode.cn/problems/evaluate-reverse-polish-notation/ 题目 …
-
【算法题解】17. 实现一个包含“加减乘除”的基本计算器
这是一道 中等难度 的题。 题目来自:https://leetcode.cn/problems/basic-calculator-ii/ 题目 给你一个字符串表达式 s …
-
【算法题解】18. 无重复字符的最长子串
这是一道 中等难度 的题。 题目来自:https://leetcode.cn/problems/longest-substring-without-repeating-c…
-
【算法题解】19. 实现一个包含“正负数和括号”的基本计算器
这是一道 困难 题。 题目来自:https://leetcode.cn/problems/basic-calculator/description/ 题目 给你一个字符串…
-
【算法题解】20. 两数之和
这是一道 简单 题。 题目来自:https://leetcode.cn/problems/two-sum/ 题目 给定一个整数数组 nums&nbs…
-
【算法题解】21. 单调栈求解 “柱状图中最大的矩形”
这是一道 困难 的题。 题目来自:https://leetcode.cn/problems/largest-rectangle-in-histogram/ 题目 给定&n…
-
【算法题解】22. 接雨水
这是一道 「困难」 题 题目来自:https://leetcode.cn/problems/trapping-rain-water/ 题目 给定 n 个非负整数表示每个宽度为 1 …
-
【算法题解】23. 滑动窗口最大值 —— 单调队列解法
这是一道 「困难」 题 题目来自:https://leetcode.cn/problems/sliding-window-maximum/ 题目 给你一个整数数组 nums,有一个…
-
【算法题解】24. 模拟机器人行走
这是一道 「中等难度」 的题 https://leetcode.cn/problems/walking-robot-simulation 题目 机器人在一个无限大小的 …