leetcode
文章平均质量分 88
mathnan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode C++ 递归&回溯
Leetcode C++ 二叉树&递归Leetecode 17 Leetecode 17 17. Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. A mapp原创 2021-03-22 10:46:03 · 352 阅读 · 0 评论 -
Leetcode C++ 二叉树&递归
Leetcode C++ 二叉树&递归Leetecode 104 Leetecode 104 104. Maximum Depth of Binary Tree Given the root of a binary tree, return its maximum depth. A binary tree’s maximum depth is the number of nodes along the longest path from the root node down to the fart原创 2021-03-02 09:51:41 · 376 阅读 · 0 评论 -
Leetcode C++ 队列
Leetcode C++ 队列Leetecode 102 Leetecode 102 102. Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). 思路: 二叉树的宽度优先遍历(BFS问题)。有两种思路,递归和迭代。 递归: 迭代: .原创 2021-02-04 10:22:28 · 258 阅读 · 0 评论 -
Leetcode C++ 链表
Leetcode 链表Leetecode 206 Leetecode 206 206. Reverse Linked List Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL 思路: 首先设定两个指针,pre和curr,翻转指针就是将curr的next指向pre,但是由于链表是单向的,因此反转后就无法获得原创 2020-12-04 09:57:35 · 389 阅读 · 1 评论 -
Leetcode C++ 查找表(Set & Map)
@[TOC](Leetcode 查找表(Set & Map)) Leetcode 290 290. Word Pattern Given a pattern and a string s, find if s follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s. Ex原创 2020-11-06 15:42:49 · 578 阅读 · 0 评论 -
Leetcode滑动窗口
Leetcode 滑动窗口Leetcode 3 Leetcode 3 3. Longest Substring Without Repeating Characters Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = “abcabcbb” Output: 3 Explanation: The answer is “abc”, with原创 2020-10-16 10:48:38 · 277 阅读 · 0 评论 -
Leetcode 排序
Leetcode 排序Leetcode 75 Leetcode 75 75. Sort Colors Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. Here, we will use the原创 2020-10-13 16:18:46 · 191 阅读 · 0 评论 -
Leetcode题解连接
Leetcode 题解连接 [L125]、[L167]、原创 2020-10-12 20:52:49 · 179 阅读 · 0 评论 -
Leetcode 对撞指针
Leetcode 对撞指针思路Leetecode 167新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 思路 该类问题特点为最优解由数组上的两个位置A和B对应的值的某种关系构成(如:和为某值)。这类问题可以首先在数组两端分原创 2020-10-12 19:51:15 · 279 阅读 · 0 评论
分享