Given a string, find the length of the longest substring without repeating characters. Exampl…
标签:LeetCode题目解答
[LeetCode] Add Two Numbers 两个数字相加,2.5 Add Two Numbers 两个数字相加
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse …
[LeetCode] Two Sum 两数之和
Given an array of integers, return indices of the two numbers such that they add up to a spec…
CareerCup All in One 题目汇总
Chapter 1. Arrays and Strings 1.1 Unique Characters of a String 1.2 Reverse String 1.3 Permutation Stri…
Manacher's Algorithm 马拉车算法
这个马拉车算法Manacher‘s Algorithm是用来查找一个字符串的最长回文子串的线性方法,由一个叫Manacher的人在1975年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常…
KMP Algorithm 字符串匹配算法KMP小结
这篇小结主要是参考这篇帖子从头到尾彻底理解KMP,不得不佩服原作者,写的真是太详尽了,让博主产生了一种读学术论文的错觉。后来发现原作者是写书的,不由得更加敬佩了。博主不才,尝试着简化一些原帖子的内容,希望能…
LeetCode Binary Search Summary 二分搜索法小结
二分查找法作为一种常见的查找方法,将原本是线性时间提升到了对数时间范围,大大缩短了搜索时间,具有很大的应用场景,而在LeetCode中,要运用二分搜索法来解的题目也有很多,但是实际上二分查找法的查找目标有很…
LeetCode Monotone Stack Summary 单调栈小结
话说博主在写Max Chunks To Make Sorted II这篇帖子的解法四时,写到使用单调栈Monotone Stack的解法时,突然脑中触电一般,想起了之前曾经在此贴的留言区中说要写单调栈的总结…
[LeetCode] Linked List Components 链表组件
We are given head, the head node of a linked list containing unique integer values. We a…
leetcode-111. Minimum Depth of Binary Tree
平时练习一下leetcode 先根据牛课网上题练习,同步leetcode官网 题目 Given a binary tree, find its minimum depth.The minimum depth is the…
leetcode-150. Evaluate Reverse Polish Notation
题目描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /…
leetcode-7. Reverse Integer
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 思路分析: Have you …