欢迎fork and star:Nowcoder-Repository-github 23. Merge k Sorted Lists 题目 Merge k sorted linked lists and return …
分类:LeetCode题目解答
[LeetCode] Symmetric Tree 判断对称树
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For exam…
[LeetCode] Logger Rate Limiter 记录速率限制器
Design a logger system that receive stream of messages along with its timestamps, each message should b…
LeetCode | Evaluate Reverse Polish Notation
题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +…
[Leetcode] 3Sum 4Sum 3Sum Closet 多数和
2Sum 在分析多数和之前,请先看Two Sum的详解 3Sum 请参阅:https://yanjia.me/zh/2019/01/… 双指针法 复杂度 时间 O(N^2) 空间 O(1) 思路 3Sum其实…
力扣(LeetCode)796
题目地址:https://leetcode-cn.com/probl…题目描述:给定两个字符串, A 和 B。 A 的旋转操作就是将 A 最左边的字符移动到最右边。 例如, 若 A = ‘abcd…
[LeetCode] Evaluate Reverse Polish Notation 计算逆波兰表达式
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are&nbs…
[LeetCode] One Edit Distance 一个编辑距离,
Given two strings S and T, determine if they are both one edit distance apart. 这道题是之前那道Edit Dist…
[LeetCode] Number Complement 补数
Given a positive integer, output its complement number. The complement strategy is to flip the bits of …
[LeetCode] Closest Leaf in a Binary Tree 二叉树中最近的叶结点
Given a binary tree where every node has a unique value, and a target key k, find the value o…
[Algo] Eight Puzzle Game 九宫格游戏
Eight Puzzle Game 九宫格游戏,给定最终状态如下,再给出一个初始状态,0代表空位,相邻的格子中的方块可以和0互换位置,求初始状态到最终状态的最小步数。 1 2 3 4 5 6 7 8 0 A*搜索 思路 …
KMP Algorithm 字符串匹配算法KMP小结
这篇小结主要是参考这篇帖子从头到尾彻底理解KMP,不得不佩服原作者,写的真是太详尽了,让博主产生了一种读学术论文的错觉。后来发现原作者是写书的,不由得更加敬佩了。博主不才,尝试着简化一些原帖子的内容,希望能…