题号leetcode题目

[LeetCode] 2090. K Radius Subarray Averages

You are given a 0-indexed array nums of n integers, and an integer k. The k-radius average for a subarray of nums centered at some index i with the ra ......
LeetCode Averages Subarray Radius 2090

每日一题力扣 1262 https://leetcode.cn/problems/greatest-sum-divisible-by-three/

、 题解 这道题目核心就算是要知道如果x%3=2的话,应该要去拿%3=1的数字,这样子才能满足%3=0 贪心 sum不够%3的时候,就减去余数为1的或者余数为2的 需要注意 两个余数为1会变成余数为2的,所以可能减去2个余数为1 核心代码如下 public int maxSumDivThreeOth ......

[LeetCode] 1262. Greatest Sum Divisible by Three

Given an integer array nums, return the maximum possible sum of elements of the array such that it is divisible by three. Example 1: Input: nums = [3, ......
Divisible LeetCode Greatest Three 1262

6-8次PTA题目总结

一、前言 通过最后这三次的大作业这学期对Java课程的学习已经接近尾声,我了解了Java的编译环境如JDK、JRE等等,Java去掉了C++语言的许多功能,是安全的、解释的、高性能的语言,但最主要的还是Java的面向对象性,Java中的类与对象的创建以及类间关系,类与类之间方法属性的调用时常让我头疼 ......
题目 PTA

一个资深测试工程师面试一来就问我这些题目

德玛作为一个已经工作有10年经验的测试工程师,其间也辗转了几个大的互联网公司,虽然确实缺少了一些稳定性,但同时也积累了一些面试的经验,不才分享一些给大家。那么主要是针对测试工程师的一些总结,对于其他的工种,我可能会在别的文章中去总结一些面试技巧,本文会着重于测试工程师的面经。 ......
一来 题目 工程师 工程

LeetCode 周赛 350(2023/06/18)01 背包变型题

> **本文已收录到 [AndroidFamily](https://github.com/pengxurui/AndroidFamily),技术和职场问题,请关注公众号 [彭旭锐] 和 [BaguTree Pro] 知识星球提问。** - 往期回顾:[LeetCode 单周赛第 348 场 · 数 ......
背包 LeetCode 2023 350 06

Leetcode Hot 100 & 239. Sliding Window Maximum

参考资料: Python文档heapq部分 考点:子串 & [题干] 1 Input: nums = [1,3,-1,-3,5,3,6,7], k = 3 2 Output: [3,3,5,5,6,7] 3 Explanation: 4 Window position Max 5 6 [1 3 -1 ......
Leetcode Sliding Maximum Window Hot

【LeetCode哈希表】前k个高频词,利用哈希表+vector进行排序操作

### 前k个高频词 https://leetcode.cn/problems/top-k-frequent-words/ 给定一个单词列表 words 和一个整数 k ,返回前 k 个出现次数最多的单词。 返回的答案应该按单词出现频率由高到低排序。如果不同的单词有相同出现频率, 按字典顺序 排序。 ......
LeetCode vector

Leetcode Hot 100 & 560. Subarray Sum Equals K

参考资料: 考点:子串 & [题干] 1 Input: nums = [1,1,1], k = 2 2 Output: 2 这道题说实话看得我一脸懵,第一时间想到的自然是双层循环遍历的一个$O(n^2)$的解法,也就是官方的解法一。但是使用这种解法会超时(Python语言是这样的,评论区有人提到了) ......
Leetcode Subarray Equals Hot 100

【JS基础】关于事件循环的一道题目

const myObject = { foo: 'hello', func: function () { const self = this console.log(1, this.foo) console.log(2, self.foo) function a() { console.log(3, ......
题目 一道 事件 基础

第三次博客:PTA题目集6-8总结

第三次博客:PTA题目集6-8总结 前言:菜单系列终于结束了,但是接踵而至的是全新的选课系列,明明JAVA课都已经上完了,但是大作业的更新却并没有停止,由此可见蔡老师真的太爱我们了。 这次的选课系统个人感觉是和点菜大同小异的,菜单==课表,选课==点菜,算价钱==算分。 题目概述: 7-1 课程成绩 ......
题目 博客 PTA

leetcode735行星碰撞vector模拟栈操作

vector的基本操作: vector<int >v; v.back();//获取尾部数据 v.front();//获取首部数据 v.push_back(3);//在尾部加入数据3 v.pop_back();//弹出尾部数据 首先只有前一个行星向右走,后一个行星向左走才可能相撞。也就是一正一负的组合 ......
行星 leetcode vector 735

leetcode:vim模式下esc代码区失焦问题

# 问题 刷力扣时用的vim模式编码,当按下esc退出插入模式的时候,发现编辑的焦点直接从代码区退出了,还想继续往下敲代码就只能再次点鼠标 ![](https://img2023.cnblogs.com/blog/1562252/202306/1562252-20230615095452544-14 ......
leetcode 模式 代码 问题 esc

【LeetCode双指针】合并两个有序数组,从后向前遍历

### 合并两个有序数组 https://leetcode.cn/problems/merge-sorted-array/ 给你两个按 非递减顺序 排列的整数数组 nums1 和 nums2,另有两个整数 m 和 n ,分别表示 nums1 和 nums2 中的元素数目。 请你 合并 nums2 到 ......
数组 指针 LeetCode 两个

Leetcode

1.两数之和 题目链接:1. 两数之和 - 力扣(LeetCode) 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。 ......
Leetcode

leetcode2390双指针一个指针写一个指针读

while(scan<s.size()){ if(s[scan]== '*'){ write==0?write:write--; scan++; continue; } s[write++]=s[scan++]; return s.substr(0,write); } ......
指针 leetcode 2390

[LeetCode] 1348. Tweet Counts Per Frequency 推文计数

A social media company is trying to monitor activity on their site by analyzing the number of tweets that occur in select periods of time. These perio ......
Frequency LeetCode Counts Tweet 1348

Leetcode常见报错的原因分析

问题1 问题描述 Line 522: Char 69: runtime error: applying non-zero offset 18446744073709551615 to null pointer (basic_string.h) 报错原因 string res = 0 报错分析 这里报 ......
原因分析 Leetcode 原因

Vscdoe 通过cookie 登陆美区 LeetCode

安装插件 vscode 安装leetcode插件。 使用cookie登陆 如果选择使用github登陆leetcode.com,似乎会有无法提交和测试的bug,而用cookie登陆就没有这个问题 使用edge获取cookie 使用Firefox获取的cookie有问题,无法正常登陆 右键,选择检查 ......
LeetCode Vscdoe cookie

Log in Leetcode in Vscode With Cookies" #标题

Install leetcode plug-in in vscode It's easy by search in Extension. Log in with cookies If you want to login leetcode in vscode leetcode plug-in by g ......
Leetcode Cookies 标题 Vscode in

5、题目:Training in Creative Problem Solving: Effects on Ideation and Problem Finding and Solving in an Industrial Research Organization

期刊信息 (1)作者:George B. Graen,Stephen G. Graen (2)期刊:Organizational Behavior and Human Performance (3)DOI:10.1016/0030-5073(82)90233-1 (4)ISSN:0030-5073 ......
Problem Solving Organization Industrial and

递归-二叉搜索树插入数据-leetcode701

```java 给定二叉搜索树(BST)的根节点 root 和要插入树中的值 value ,将值插入二叉搜索树。 返回插入后二叉搜索树的根节点。 输入数据 保证 ,新值和原始二叉搜索树中的任意节点值都不同。 注意,可能存在多种有效的插入方式,只要树在插入后仍保持为二叉搜索树即可。 你可以返回 任意有 ......
leetcode 数据 701

Leetcode常见报错的原因分析

问题1 问题描述 Line 522: Char 69: runtime error: applying non-zero offset 18446744073709551615 to null pointer (basic_string.h) 报错原因 string res = 0 报错分析 这里报 ......
原因分析 Leetcode 原因

[LeetCode] 2475. Number of Unequal Triplets in Array

You are given a 0-indexed array of positive integers nums. Find the number of triplets (i, j, k) that meet the following conditions: 0 <= i < j < k < ......
LeetCode Triplets Unequal Number Array

【LeetCode专题#基本计算器】基本计算器I,图解中序表达式转逆波兰表达式,太难了

### 基本计算器 https://leetcode.cn/problems/basic-calculator/?envType=list&envId=cKNEfNsF 给你一个字符串表达式 s ,请你实现一个基本计算器来计算并返回它的值。 注意:不允许使用任何将字符串作为数学表达式计算的内置函数, ......
表达式 计算器 LeetCode 专题

LeetCode 51. N 皇后

``` class Solution { public: vector> res; vector path; vector anti_diag,col,diag; void dfs(int n,int u) { if(u==n) { res.push_back(path); return; } st ......
皇后 LeetCode 51

leetCode1768.交替合并字符串 && [1679] K 和数对的最大数目

题目:给你两个字符串 word1 和 word2 。请你从 word1 开始,通过交替添加字母来合并字符串。如果一个字符串比另一个字符串长,就将多出来的字母追加到合并后字符串的末尾。返回 合并后的字符串 。 输入:word1 = "abc", word2 = "pqr" 输出:"apbqcr" 解释 ......
和数 字符串 数目 amp 字符

LeetCode/区间子数组个数

给你一个整数数组 nums 和两个整数:left 及 right 找出 nums 中连续、非空且其中最大元素在范围 [left, right] 内的子数组,并返回满足条件的子数组的个数 ###1. 遍历区间右端点 + 同时记录满足条件的左边点位 数组中不能含有大于 right的元素, 且至少含有一个 ......
数组 区间 个数 LeetCode

二刷Leetcode-Days10

1. 二叉树 /** * 102. BinaryTree的层序遍历(借助辅助队列实现,递归法pass) * @param root * @return */ public List<List<Integer>> levelOrder(TreeNode root) { List<List<Intege ......
Leetcode-Days Leetcode Days 10