算法题汇总

news/2024/9/19 22:46:19/ 标签: 算法, 前端, javascript

算法汇总

    1. 环形链表 https://leetcode.cn/problems/linked-list-cycle/
    1. 反转链表 https://leetcode.cn/problems/reverse-linked-list/28
    1. 环形链表 II https://leetcode.cn/problems/linked-list-cycle-ii/
    1. 快乐数 https://leetcode.cn/problems/happy-number/
    1. 反转链表 II https://leetcode.cn/problems/reverse-linked-list-ii/
    1. K 个一组翻转链表 https://leetcode.cn/problems/reverse-nodes-in-k-group/
  1. 1.两数之和 https://leetcode.cn/problems/two-sum/
    1. 搜索插入位置 https://leetcode.cn/problems/search-insert-position/
    1. 二分查找 https://leetcode.cn/problems/binary-search/
    1. 寻找旋转排序数组中的最小值 https://leetcode.cn/problems/find-minimum-in-rotated-sorted-array/
    1. 搜索旋转排序数组 https://leetcode.cn/problems/search-in-rotated-sorted-array/
    1. x 的平方根 https://leetcode.cn/problems/sqrtx/
    1. 在排序数组中查找元素的第一个和最后一个位置 https://leetcode.cn/problems/find-first-and-last-position-of-element-in-sorted-array/
    1. 在 D 天内送达包裹的能力 https://leetcode.cn/problems/capacity-to-ship-packages-within-d-days/
    1. 相同的树 https://leetcode.cn/problems/same-tree/
    1. 对称二叉树 https://leetcode.cn/problems/symmetric-tree/
    1. 合并二叉树 https://leetcode.cn/problems/merge-two-binary-trees/
    1. 二叉树的前序遍历 https://leetcode.cn/problems/binary-tree-preorder-traversal/
    1. 二叉树的最小深度 https://leetcode.cn/problems/minimum-depth-of-binary-tree/
    1. 二叉树展开为链表 https://leetcode.cn/problems/flatten-binary-tree-to-linked-list/
    1. 二叉树的最近公共祖先 https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-tree/
    1. 二叉树的直径 https://leetcode.cn/problems/diameter-of-binary-tree/
    1. 另一棵树的子树 https://leetcode.cn/problems/subtree-of-another-tree/
    1. 完全二叉树的节点个数 https://leetcode.cn/problems/count-complete-tree-nodes/
    1. 二叉树的所有路径 https://leetcode.cn/problems/binary-tree-paths/
    1. 二叉树的层序遍历 https://leetcode.cn/problems/binary-tree-level-order-traversal/
    1. 二叉树的层序遍历 II https://leetcode.cn/problems/binary-tree-level-order-traversal-ii/
    1. 二叉树的右视图 https://leetcode.cn/problems/binary-tree-right-side-view/
    1. 二叉树的层平均值 https://leetcode.cn/problems/average-of-levels-in-binary-tree/
    1. 填充每个节点的下一个右侧节点指针 https://leetcode.cn/problems/populating-next-right-pointers-in-each-node/
    1. N 叉树的层序遍历 https://leetcode.cn/problems/n-ary-tree-level-order-traversal/
    1. 路径总和 https://leetcode.cn/problems/path-sum/
    1. 左叶子之和 https://leetcode.cn/problems/sum-of-left-leaves/
    1. 验证二叉搜索树 https://leetcode.cn/problems/validate-binary-search-tree/
    1. 恢复二叉搜索树 https://leetcode.cn/problems/recover-binary-search-tree/
    1. 用队列实现栈 https://leetcode.cn/problems/implement-stack-using-queues/
    1. 用栈实现队列 https://leetcode.cn/problems/implement-queue-using-stacks/
    1. 逆波兰表达式求值 https://leetcode.cn/problems/evaluate-reverse-polish-notation/
    1. 删除字符串中的所有相邻重复项 https://leetcode.cn/problems/remove-all-adjacent-duplicates-in-string/
    1. 反转字符串中的单词 https://leetcode.cn/problems/reverse-words-in-a-string/description/
    1. 电话号码的字母组合 https://leetcode.cn/problems/letter-combinations-of-a-phone-number/
    1. 组合总和 https://leetcode.cn/problems/combination-sum/
    1. N 皇后 https://leetcode.cn/problems/n-queens/
    1. 解数独 https://leetcode.cn/problems/sudoku-solver/
    1. 组合 https://leetcode.cn/problems/combinations/
    1. 子集 https://leetcode.cn/problems/subsets/
    1. 分割回文串 https://leetcode.cn/problems/palindrome-partitioning/
    1. 复原 IP 地址 https://leetcode.cn/problems/restore-ip-addresses/
    1. 跳跃游戏 https://leetcode.cn/problems/jump-game/
    1. 跳跃游戏 II https://leetcode.cn/problems/jump-game-ii/
    1. 用最少数量的箭引爆气球 https://leetcode.cn/problems/minimum-number-of-arrows-to-burst-balloons/
    1. 无重叠区间 https://leetcode.cn/problems/non-overlapping-intervals/
    1. Dota2 参议院 https://leetcode.cn/problems/dota2-senate/
    1. 爬楼梯 https://leetcode.cn/problems/climbing-stairs/
    1. 使用最小花费爬楼梯 https://leetcode.cn/problems/min-cost-climbing-stairs/
    1. 不同路径 https://leetcode.cn/problems/unique-paths/
    1. 不同路径 II https://leetcode.cn/problems/unique-paths-ii/
    1. 打家劫舍 https://leetcode.cn/problems/house-robber/
    1. 打家劫舍 II https://leetcode.cn/problems/house-robber-ii/
    1. 打家劫舍 III https://leetcode.cn/problems/house-robber-iii/
    1. 买卖股票的最佳时机 https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/
    1. 买卖股票的最佳时机 II https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-ii/
    1. 买卖股票的最佳时机 III https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-iii/
    1. 买卖股票的最佳时机含手续费 https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/
    1. 最大子数组和 https://leetcode.cn/problems/maximum-subarray/
    1. 最长连续递增序列 https://leetcode.cn/problems/longest-continuous-increasing-subsequence/
    1. 零钱兑换 II https://leetcode.cn/problems/coin-change-ii/
    1. 判断子序列 https://leetcode.cn/problems/is-subsequence/
    1. 最长公共子序列 https://leetcode.cn/problems/longest-common-subsequence/
    1. 不同的子序列 https://leetcode.cn/problems/distinct-subsequences/
    1. 两个字符串的删除操作 https://leetcode.cn/problems/delete-operation-for-two-strings/
    1. 简化路径 https://leetcode.cn/problems/simplify-path/
    1. 赎金信 https://leetcode.cn/problems/ransom-note/
    1. 有效的字母异位词 https://leetcode.cn/problems/valid-anagram/
    1. 三数之和 https://leetcode.cn/problems/3sum/
    1. 四数之和 https://leetcode.cn/problems/4sum/
    1. Nim 游戏 https://leetcode.cn/problems/nim-game/
    1. 石子游戏 https://leetcode.cn/problems/stone-game/
    1. 3 的幂 https://leetcode.cn/problems/power-of-three/description/
    1. 数组中的第K个最大元素 https://leetcode.cn/problems/kth-largest-element-in-an-array/
    1. 数据流的中位数 https://leetcode.cn/problems/find-median-from-data-stream/
    1. 前 K 个高频元素 https://leetcode.cn/problems/top-k-frequent-elements/
    1. 最小栈 https://leetcode.cn/problems/min-stack/
    1. 整数反转 https://leetcode.cn/problems/reverse-integer/description/
  2. 61.旋转链表 https://leetcode.cn/problems/rotate-list/
  3. 24.两两交换链表的节点 https://leetcode.cn/problems/swap-nodes-in-pairs/
    1. 删除链表的倒数第 N 个结点 https://leetcode.cn/problems/remove-nth-node-from-end-of-list/
    1. 删除排序链表中的重复元素 https://leetcode.cn/problems/remove-duplicates-from-sorted-list/
    1. 删除排序链表中的重复元素 II https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/
    1. 设计循环队列 https://leetcode.cn/problems/design-circular-queue/
    1. 设计循环双端队列 https://leetcode.cn/problems/design-circular-deque/
    1. 设计前中后队列 https://leetcode.cn/problems/design-front-middle-back-queue/
    1. 最近的请求次数 https://leetcode.cn/problems/number-of-recent-calls
  4. 面试题 17.09. 第 k 个数 https://leetcode.cn/problems/get-kth-magic-number-lcci/
    1. 亲密字符串 https://leetcode.cn/problems/buddy-strings/
    1. 柠檬水找零 https://leetcode.cn/problems/lemonade-change
    1. 煎饼排序 https://leetcode.cn/problems/pancake-sorting/
    1. 任务调度器 https://leetcode.cn/problems/task-scheduler/
  5. 面试题 03.04. 化栈为队 https://leetcode.cn/problems/implement-queue-using-stacks-lcci/
    1. 棒球比赛 https://leetcode.cn/problems/baseball-game
    1. 比较含退格的字符串 https://leetcode.cn/problems/backspace-string-compare/
    1. 验证栈序列 https://leetcode.cn/problems/validate-stack-sequences/
    1. 有效的括号 https://leetcode.cn/problems/valid-parentheses
    1. 删除最外层的括号 https://leetcode.cn/problems/remove-outermost-parentheses
    1. 移除无效的括号 https://leetcode.cn/problems/minimum-remove-to-make-valid-parentheses
    1. 验证二叉树的前序序列化 https://leetcode.cn/problems/verify-preorder-serialization-of-a-binary-tree/
    1. 基本计算器 II https://leetcode.cn/problems/basic-calculator-ii/

http://www.ppmy.cn/news/1520654.html

相关文章

掌握SQL的“删除艺术”:如何使用DROP TABLE命令

掌握SQL的“删除艺术”:如何使用DROP TABLE命令 在数据库管理中,有时候我们需要彻底删除一个表,这可能是为了重新设计数据库结构,或者因为某些表不再需要。SQL 提供了 DROP TABLE 语句来实现这一功能。本文将详细介绍 DROP TABLE…

react 中three.js 模型渲染

npm install three import * as THREE from "three"; import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js"; const mountRef useRef(null); useEffect(() > {// 创建渲染器 const renderer new THREE.WebGLRenderer(); const wi…

“解决MySQL容器启动后无法编辑文件的问题:实用指南“

前段时间拉取了个MySQL的容器节点,但是拉起之后发现居然编辑不了MySQL的配置文件,这是我的启动命令 docker run -itd -p 3310:3306 -e MYSQL_ROOT_PASSWORD12345678 --name slave2 f5f171121fa3 bash 下面总结下解决方法: 编辑docker file…

MES基于C#开发计划管理组件集成WinCC中使用

MES系统通常都会与SCADA系统集成使用,尤其具备中控管理需求的工厂,集控SCADA需要集成MES系统的计划工单数据实现工单数据、工艺配方数据、SN数据、打码数据等下发,执行状态、关键参数反馈等上传。本文介绍在WinCC画面集成基于C#开发的计划管理…

[论文笔记] LLM模型剪枝

Attention Is All You Need But You Don’t Need All Of It For Inference of Large Language Models LLaMA2在剪枝时,跳过ffn和跳过full layer的效果差不多。相比跳过ffn/full layer,跳过attention layer的影响会更小。 跳过attention layer:7B/13B从100%参…

iOS 收集打印日志

可以将要在Xcode 控制台打印的日志写在沙盒,最后导出分享,进行问题分析。 正式版本不建议使用,避免增加用户内存。配合解决顽固 Bug 可以通过该方法收集打印日志 .h头文件 interface LogManager : NSObject(FSLogManager *)shareInstance; -…

冲刺蓝桥杯第三章字符串

ASCII码值、字母大小写转换、‘0’~‘9’ //数字转字符:A(65)a(97)0(48) char A=char(65); char a=char(97); char c

终极解决 docker 拉取镜像失败的问题,其他类似场景也适用

国内的网络环境,想必大家都是知道的,虽说技术无罪,但奈何政策不允许啊,以下内容我在 CSDN 上发不了,请大家移步我的个人公 * 号:新质程序猿,查看更多原创内容,这里只介绍相关背景和需…

字节6面,面爆炸了

字节跳动 昨晚在牛客网刷到一篇"深夜 EMO 贴",又是讲字节 N 面挂的。 原本的 4HR 面都过了,结果 Offer 审批的时候,被 HR 通知加一轮交叉面,一共 6 面。 加面时,两个面试官全程黑脸,最后两道算法…

软考 -- 软件设计师 -- 二轮复习(2) -- 程序设计语言(持续更新)

软考 – 软件设计师 – 二轮复习(2) – 程序设计语言(持续更新) 文章目录 软考 -- 软件设计师 -- 二轮复习(2) -- 程序设计语言(持续更新)前言一、编译、解释、基本控制结构二、数据类型三、变量和常量、逻辑表达式(短路:&&、||、!)四、传值调用…

【qt】多线程实现倒计时

1.界面设计 设置右边的intvalue从10开始倒计时 2.新建Thread类 新建Thread类,使其继承QThread类,多态重写run函数,相当于线程执行函数 3.重写run函数 重写run函数,让另一个进程每隔1s发出一个信号,主线程使用conne…

Ps:渲染视频

Ps菜单:文件/导出/渲染视频 File/Export/Render Video 在 Photoshop 中创建视频或动画内容后,可以通过渲染视频 Render Video命令对其进行优化、渲染和导出。 “渲染视频”对话框中提供了两种编码器:Adobe Media Encoder 及 Photoshop 图像序…

【Postgresql】地理空间数据的存储与查询,查询效率优化策略,数据类型与查询速度的影响

注:使用postgresql数据库会用到PostGIS 扩展。 一、安装PostGIS 扩展 在 PostgreSQL 中遇到错误 “type geography does not exist” 通常意味着你的 PostgreSQL 数据库还没有安装 PostGIS 扩展,或者 PostGIS 扩展没有被正确地安装在你的数据库中。geography 类型是 PostGI…

(前端)面试300问之(3)this的指向判断

一、this的相关理解与解读 1、各角度看this。 1)ECMAScript规范: this 关键字执行为当前执行环境的 ThisBinding。 2)MDN: In most cases, the value of this is determined by how a function is called. 在绝大多数情况下&…

嵌入式硬件-ARM处理器架构,CPU,SOC片上系统处理器

多进程空间内部分布图:注意:创建线程实际使用堆区空间,栈区独立 ARM处理器架构: 基于ARM920T架构的CPU:以下为哈佛结构 ALU:算数运算器 R0~R12:寄存器 PC:程序计数器,默认为0,做自加运算&#x…

kafka单条消息过大发送失败

一、背景 生产环境中使用kafka作为消息队列,生产者发送消息失败,查询报错日志,得到如下输出: Caused by: org.springframework.kafka.KafkaException: Send failed; nested exception is org.apache.kafka.common.errors.RecordT…

JSON格式化?超简单!

JSON格式化 是指将JSON(JavaScript Object Notation)数据转换成一种更易读、结构化的格式。 在以下场景中,可能需要进行JSON格式化: 调试和开发:在开发过程中,开发人员经常需要查看和解析JSON数据。通过…

基于深度学习的遥感图像分类识别系统,使用PyTorch框架实现

取5个场景 [海滩, 灌木丛, 沙漠, 森林, 草地] 划分数据集 train:val:test 7:2:1 环境依赖 pytorch1.1 or 1.0 tensorboard1.8 tensorboardX pillow 注意调低batch_size参数特别是像我这样的渣渣显卡 使用方法 只需要指…

如何快速采集淘宝商品数据?

无论是谁,如果单凭人工的方式去收集淘宝、天猫等平台的商品数据信息,工作量是巨大的,如果借助有采集软件的第三方公司操作,则可实现对大数据的轻松掌握,但是外包给第三方公司需要支付一定的费用,包含技术费…

Canvas 在 微信小程序-uni-APP 和 H5 中的使用差异

Canvas 是一个强大的绘图工具,无论是在 Web 开发还是跨平台应用开发中都有广泛应用。然而,在 uni-APP 和传统 H5 环境中使用 Canvas 时,存在一些重要的差异。本文将深入探讨这些差异,帮助开发者在不同平台上更好地使用 Canvas。 1. API 差异 H5 环境 在 H5 环境中,我们使用标…