avatar
文章
823
标签
1101
分类
40
首页
主线
归档
标签
关于
家书
  • 父亲的与子书
  • 给女友的情书
LogoHespethornのBlog
搜索
首页
主线
归档
标签
关于
家书
  • 父亲的与子书
  • 给女友的情书

Algorithms

Leetcode 0226. Invert Binary Tree
发表于2023-11-08|AlgorithmsLeetcode-C++
226. Invert Binary TreeGiven the root of a binary tree, invert the tree, and return its root. Example 1: Example 2: Example 3: 题目大意给定一棵二叉树的根节点 ro...
Leetcode 0225. Implement Stack using Queues
发表于2023-11-06|AlgorithmsLeetcode-C++
225. Implement Stack using QueuesImplement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of ...
Leetcode 0222. Count Complete Tree Nodes
发表于2023-11-01|AlgorithmsLeetcode-C++
222. Count Complete Tree NodesGiven the root of a complete binary tree, return the number of the nodes in the tree. According to Wikipedia, every level, exce...
Leetcode 0216. Combination Sum III
发表于2023-10-30|AlgorithmsLeetcode-C++
216. Combination Sum IIIFind all valid combinations of k numbers that sum up to n such that the following conditions are true: Only numbers 1 through 9 are ...
Leetcode 0209. Minimum Size Subarray Sum
发表于2023-10-27|AlgorithmsLeetcode-C++
209. Minimum Size Subarray Sum题目Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the...
Leetcode 0206. Reverse Linked List
发表于2023-10-22|AlgorithmsLeetcode-C++
206. Reverse Linked ListGiven the head of a singly linked list, reverse the list, and return the reversed list. Example 1: Example 2: Example 3: ...
Leetcode 0199. Binary Tree Right Side View
发表于2023-10-17|AlgorithmsLeetcode-C++
199. Binary Tree Right Side ViewGiven the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can se...
Leetcode 0189. 轮转数组
发表于2023-10-14|AlgorithmsLeetcode-C++
189. 轮转数组给定一个整数数组 nums,将数组中的元素向右轮转 k 个位置,其中 k 是非负数。 示例 1: 示例 2: 题目大意给定一个整数数组 nums 和非负整数 k,将数组元素向右轮转 k 个位置(即每个元素向右移动 k 位,末尾元素移动到开头)。要求尽可能优化时间和空间复杂度。 核心解...
Leetcode 0180. 连续出现的数字
发表于2023-10-12|AlgorithmsLeetcode-C++
180. 连续出现的数字表:Logs 找出所有至少连续出现三次的数字。 返回的结果表中的数据可以按 任意顺序 排列。 结果格式如下面的例子所示: 示例 1: 解题思路核心思路是 “通过自连接匹配连续三行的数字”:由于 id 是自增列,连续出现的数字对应的 id 必然是连续的(如 id=1,2,3 对应...
Leetcode 0162. Find Peak Element
发表于2023-10-09|AlgorithmsLeetcode-C++
162. Find Peak Element题目A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a peak el...
Leetcode 0155. Min Stack
发表于2023-10-05|AlgorithmsLeetcode-C++
155. Min StackDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: MinStack() ini...
Leetcode 0151. Reverse Words in a String
发表于2023-10-01|AlgorithmsLeetcode-C++
151. Reverse Words in a StringGiven an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in ...
Leetcode 0150. Evaluate Reverse Polish Notation
发表于2023-09-28|AlgorithmsLeetcode-C++
150. Evaluate Reverse Polish NotationYou are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation. Evaluate...
Leetcode 0148. 排序链表
发表于2023-09-26|AlgorithmsLeetcode-C++
148. 排序链表给你链表的头结点 head ,请将其按 升序 排列并返回 排序后的链表 。 示例 1: 示例 2: 示例 3: 题目大意给定链表的头节点 head,要求将链表按升序排列并返回排序后的链表头节点。 解题思路对于链表排序,最适合的高效算法是归并排序,原因如下: 归并排序的时...
Leetcode 0146. LRU Cache
发表于2023-09-22|AlgorithmsLeetcode-C++
146. LRU CacheDesign a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity...
1…8910…15
avatar
Hespethorn
文章
823
标签
1101
分类
40
GitHub
fox
ciwei
最新文章
计算机原则五讲(一):这笔投入能换回什么2026-11-20
计算机原则五讲(三):责任放在哪一层2026-11-20
计算机原则五讲(二):故障发生时还剩什么保证2026-11-20
计算机原则五讲(五):规模一上来,系数说了算2026-11-20
计算机原则五讲(六):没有免费的优化2026-11-20
分类
  • AI-ML53
    • AI-App20
    • AI-News33
  • Algorithms219
    • DSA35
    • Leetcode-C++141
    • Leetcode-Mysql6
    • Leetcode-Python37
  • CS-Fundamentals41
    • CS501
    • CS61A20
    • CS61B20
  • CS-Principles13
  • Database20
    • Mysql5
标签
CS-Principles专栏介绍分治存储垃圾回收容错引用透明封装关注点分离逃逸分析分布式事务数据一致性安全工程算法分析网络协议操作系统软件测试语言运行时工程运维版本管理
归档
  • 2026年11月 20
  • 2026年10月 10
  • 2026年09月 53
  • 2026年08月 56
  • 2026年07月 38
  • 2026年06月 47
网站信息
文章数目 :
823
运行时间 :
本站总字数 :
1885.8k
最后更新时间 :
搜索
数据加载中