摘要: 目录基础练习题具体题目二叉树排序双指针法类型1:一个头指针,一个尾指针,不断缩小搜索空间类型2:快慢指针法链表动态规划二分搜索排序数组排序基于交换的排序冒泡排序快速排序基于插入的排序插入排序基于选择的排序选择排序二路归并排序链表排序搜索二分搜索二叉树的遍历深度优先遍历先序遍历中序遍历后序遍历广度优先 阅读全文
posted @ 2024-05-15 20:09 金字塔下的蜗牛 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 问题描述 An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Given an integer n, return the nth *ugly number*. 解释: 一个丑数是一 阅读全文
posted @ 2024-05-15 19:46 金字塔下的蜗牛 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 64 - Minimum Path Sum 最小路径和 问题描述 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the s 阅读全文
posted @ 2024-05-14 22:53 金字塔下的蜗牛 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three opera 阅读全文
posted @ 2024-05-13 22:23 金字塔下的蜗牛 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 45_jump Game II 跳跃游戏II 问题描述 链接:https://leetcode.com/problems/jump-game-ii/description/ You are given a 0-indexed array of integers nums of length n. Y 阅读全文
posted @ 2024-05-12 22:08 金字塔下的蜗牛 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 问题描述 You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maxim 阅读全文
posted @ 2024-05-11 23:36 金字塔下的蜗牛 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 42 -Trapping Rain Water 接雨水 问题描述 链接:https://leetcode.com/problems/trapping-rain-water/description/ Given n non-negative integers representing an eleva 阅读全文
posted @ 2024-05-10 21:55 金字塔下的蜗牛 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 问题描述 Given an integer array nums, find the subarray with the largest sum, and return its sum. 给定一个数组nums, 找到一个子数组。使它的和最大,返回子数组 例子 Input: nums = [-2,1, 阅读全文
posted @ 2024-05-09 22:29 金字塔下的蜗牛 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 最长递增子序列 连接:https://leetcode.com/problems/longest-increasing-subsequence/description/ 问题描述 Given an integer array nums, return the length of the longes 阅读全文
posted @ 2024-05-08 22:54 金字塔下的蜗牛 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 目录前述第二章:变量、表达式、和语句第三章:函数第五章:条件和递归第六章:有返回数值的函数第七章: 迭代第八章:字符串第十章:列表第十一章:词典第十二章:tuple第十四章:文件14.2 读和写14.3 格式化字符串,两种方式14.4 os模块14.5 读写异常14.7 pickle14.9 模块相 阅读全文
posted @ 2024-05-08 21:06 金字塔下的蜗牛 阅读(3) 评论(0) 推荐(0) 编辑