结点leetcode 19

LeetCode Day01 704. & 27.

###### [704. Binary Search](https://leetcode.cn/problems/binary-search/)入门必备二分查找了。必须是在一堆**有序的**数组中找到其中特定某个val值。###### 二分算法的思路:*首先取一个基准值,这个值我们一般取数组的中间位 ......
LeetCode Day 704 amp 01

【LeetCode递归】括号生成,使用dfs

括号匹配 数字 n 代表生成括号的对数,请你设计一个函数,用于能够生成所有可能的并且 有效的 括号组合。 示例 1: 输入:n = 3 输出:["((()))","(()())","(())()","()(())","()()()"] 示例 2: 输入:n = 1 输出:["()"] 提示: 1 < ......
括号 LeetCode dfs

对于ogg19 mysql 中如果mysql中存在json数据类型,进程会abend问题报错信息 OGG-00774

对于ogg19 mysql是不支持json的这个数据类型还是比较常见的,这个数据类型是在ogg21才开始支持,对于这种报错 可以打补丁进行修复 Bug 29998662 : MySQL Extract Abends Without Error with JSON data types in binl ......
mysql 进程 类型 数据 问题

[LeetCode] 2863. Maximum Length of Semi-Decreasing Subarrays_Medium tag: stack

You are given an integer array nums. Return the length of the longest semi-decreasing subarray of nums, and 0 if there are no such subarrays. A subarr ......

[LeetCode] 2434. Using a Robot to Print the Lexicographically Smallest String_Medium tag: stack

You are given a string s and a robot that currently holds an empty string t. Apply one of the following operations until s and t are both empty: Remov ......

LeetCode101.对称二叉树

class Solution { //ArrayDeque不支持添加null public boolean isSymmetric(TreeNode root) { return dfs(root.left,root.right); } // 实际上,递归比较的就是根节点左右子树上,对称位置的节点 ......
LeetCode 101

算法解析:LeetCode——机器人碰撞和最低票价

摘要:本文由葡萄城技术团队原创。转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具、解决方案和服务,赋能开发者。 机器人碰撞 问题: 现有 n 个机器人,编号从 1 开始,每个机器人包含在路线上的位置、健康度和移动方向。 给你下标从 0 开始的两个整数数组 positions、health ......
票价 机器人 算法 LeetCode 机器

[LeetCode] 2282. Number of People That Can Be Seen in a Grid_Medium tag: stack.

You are given an m x n 0-indexed 2D array of positive integers heights where heights[i][j] is the height of the person standing at position (i, j). A ......
Grid_Medium LeetCode Number Medium People

Data structure - Stack 小结及leetcode相关题目

Linear data structure - Stack O(1) for push O(1) for pop O(1) for top - Basic skills 先进后出 [LeetCode] 232. Implement Queue using Stacks_Easy tag: stack ......
小结 structure leetcode 题目 Stack

[LeetCode] 1944. Number of Visible People in a Queue_Hard tag: stack

There are n people standing in a queue, and they numbered from 0 to n - 1 in left to right order. You are given an array heights of distinct integers ......
Queue_Hard LeetCode Visible Number People

leetcode122买卖股票的最佳时机——贪心、动态规划

题目描述: 给你一个整数数组 prices ,其中 prices[i] 表示某支股票第 i 天的价格。 在每一天,你可以决定是否购买和/或出售股票。你在任何时候 最多 只能持有 一股 股票。你也可以先购买,然后在 同一天 出售。 返回 你能获得的 最大 利润 。 示例 1: 输入:prices = ......
时机 leetcode 股票 动态 122

LeetCode 383 赎金信

LeetCode 383 赎金信 1. 题目地址 https://leetcode.cn/problems/ransom-note/?envType=study-plan-v2&envId=top-interview-150 2. 题解 这道题是一道哈希表的经典例题,具体步骤如下: 1. 定义哈希表 ......
LeetCode 383

LeetCode 392 判断子序列

LeetCode 392 判断子序列 1. 题目地址 https://leetcode.cn/problems/is-subsequence/?envType=study-plan-v2&envId=top-interview-150 2. 题解 采用双指针算法,具体步骤如下: 1. i指针指向s的 ......
序列 LeetCode 392

JDK19特性之虚拟线程

目录1 虚拟线程1.1 前言1.2 虚拟线程介绍1.3 虚拟线程如何被JVM调度1.4 平台线程和虚拟线程的区别1.4.1 虚拟线程始终是守护线程1.4.2 虚拟线程始终具有正常优先级1.4.3 虚拟线程不是线程组的活动成员1.4.4 虚拟线程不支持stop、suspend或resume1.4.5 ......
线程 特性 JDK 19

leetcode189旋转数组解决——局部旋转 (C/C++/python)

给定一个整数数组 nums,将数组中的元素向右轮转 k 个位置,其中 k 是非负数。 示例 1: 输入: nums = [1,2,3,4,5,6,7], k = 3 输出: [5,6,7,1,2,3,4] 解释: 向右轮转 1 步: [7,1,2,3,4,5,6] 向右轮转 2 步: [6,7,1, ......
数组 局部 leetcode python 189

LeetCode49——字母异位词分组

给你一个字符串数组,请你将 字母异位词 组合在一起。可以按任意顺序返回结果列表。 字母异位词 是由重新排列源单词的所有字母得到的一个新单词。 示例 1: 输入: strs = ["eat", "tea", "tan", "ate", "nat", "bat"] 输出: [["bat"],["nat" ......
字母 LeetCode 49

[LeetCode] 2578. Split With Minimum Sum

Given a positive integer num, split it into two non-negative integers num1 and num2 such that: The concatenation of num1 and num2 is a permutation of  ......
LeetCode Minimum Split 2578 With

10月12日19:30|BIM+GIS用于公路施工组织策划专题直播

当前BIM+GIS三维数字沙盘技术成为了交通建设领域的一大热门话题。交通部也在近日发布了《推荐公路数字化转型的意见》,明确指出了BIM+GIS技术应用对于公路数字化转型的重要性。那么,公路工程建设施工组织策划阶段,该如何更好地应用BIM+GIS技术呢? 我们很荣幸的邀请到了交通建设领域BIM+GIS ......
组织策划 公路施工 公路 专题 BIM

LeetCode 58 最后一个单词的长度

LeetCode 58 最后一个单词的长度 1. 题目地址 https://leetcode.cn/problems/length-of-last-word/description/?envType=study-plan-v2&envId=top-interview-150 2. 题解 这道题由于要 ......
单词 长度 LeetCode 58

【LeetCode】最小处理时间

题目 你有 n 颗处理器,每颗处理器都有 4 个核心。现有 n * 4 个待执行任务,每个核心只执行 一个 任务。 给你一个下标从 0 开始的整数数组 processorTime ,表示每颗处理器最早空闲时间。另给你一个下标从 0 开始的整数数组 tasks ,表示执行每个任务所需的时间。返回所有任 ......
LeetCode 时间

算法训练day29 LeetCode 39.40.131

算法训练day29 LeetCode 39.40.131 39.组合总和 题目 39. 组合总和 - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) class Solution { private: vector<vector<int>> result; ve ......
算法 LeetCode day 131 29

39-19

设有有一个带头结点的循环单链表,反复找出单链表中最小的结点并删除,直至链表为空 注意删除需要释放空间,包括释放最后的链表头结点 #include <stdio.h> #include <stdlib.h> typedef struct node{ int data; struct node *nex ......
39 19

19 自动驾驶车辆探测

import numpy as np import tensorflow as tf # 需要安装pip install opencv-python==4.5.3.56 import cv2 from IPython.display import Image, display from tensor ......
车辆 19

聊聊JDK19特性之虚拟线程

在读《深入理解JVM虚拟机》这本书前两章的时候整理了JDK从1.0到最新版本发展史,其中记录了JDK这么多年来演进过程中的一些趣闻及引人注目的一些特性,在调研JDK19新增特性的时候了解到了虚拟线程这个概念,于是对虚拟线程进行学习整理内容如下。 ......
线程 特性 JDK 19

Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory) 报错消息解决方法

本人使用 centos:7.6.1810 及 Miniconda3-py311_23.5.2-0-Linux-x86_64 默认状态下应该没有这个问题。 当在使用conda下载包时,如果不小心更新了涉及conda-libmamba-solver 和 libarchive的包,就可能会导致这个报错消息 ......

算法训练day28 LeetCode 216.17.

算法训练day28 LeetCode 216.17. 216.组合总和III 题目 216. 组合总和 III - 力扣(LeetCode) 题解 代码随想录 (programmercarl.com) class Solution { private: vector<vector<int>> res ......
算法 LeetCode day 216 28

算法训练day27 回溯算法概述、LeetCode77

算法训练day27 回溯算法概述、LeetCode77. 回溯算法 与递归函数联系,是一种纯暴力搜索方式 解决问题(抽象为树形结构 组合问题(无序 切割问题 子集问题 排列问题(有序 棋盘问题(n皇后、解数独 回溯算法模板 void backtracking(参数) { if (终止条件) { 存放 ......
算法 LeetCode day 27 77

LeetCode——98. 验证二叉搜索树

98. 验证二叉搜索树 本次博客,我将记录验证二叉搜索树 由于二叉搜索树的性质是每个节点的左子树中的全部节点数据小于它,而右子树中的全部节点的数据都大于它,因此可以通过这条性质来进行判断 刚上手的时候直接就做了,没考虑到局部最优而非全局最优的情况,遇到这种测试用例直接寄了: 是的,虽然3小于6,7大 ......
LeetCode 98

LeetCode 13 罗马数字转整数

LeetCode 13 罗马数字转整数 1. 题目地址 https://leetcode.cn/problems/roman-to-integer/description/ 2. 题解 这道题的解题过程非常简单,具体如下: 1. 我们需要将罗马数字对应的数,存到一个哈希表中。待用到时,直接使用即可。 ......
整数 LeetCode 数字 13