leetcode day9 day
vue 学习 day4
VUE 相关的指令: v-html 插入原始的 html const raw_html = "<h1>Hello world</h1> <p v-html="raw_html"></p> <!-- 标签不能再有孩子节点, 有的话会报错 --> v-bind 缩写是 ":" 绑定属性值 demo co ......
初学C语言day04--数组
#### 一、数组 ###### 什么是数组: 变量的组合,是一种批量定义相同类型变量的方式 定义: 类型名 数组名[数量]; int arr[5]; 注意:数组的长度一旦确定,无法改变 ###### 使用: 数组名[下标]; 下标:从0开始,范围:0~数量-1 遍历:把数组的数据从头到尾显示或访问 ......
[LeetCode] 2268. Minimum Number of Keypresses
You have a keypad with 9 buttons, numbered from 1 to 9, each mapped to lowercase English letters. You can choose which characters each button is match ......
[LeetCode] 2323. Find Minimum Time to Finish All Jobs II
You are given two 0-indexed integer arrays jobs and workers of equal length, where jobs[i] is the amount of time needed to complete the ith job, and w ......
[LeetCode] 2330. Valid Palindrome IV
You are given a 0-indexed string s consisting of only lowercase English letters. In one operation, you can change any character of s to any other char ......
[LeetCode] 2340. Minimum Adjacent Swaps to Make a Valid Array
You are given a 0-indexed integer array nums. Swaps of adjacent elements are able to be performed on nums. A valid array meets the following condition ......
[LeetCode] 2422. Merge Operations to Turn Array Into a Palindrome
You are given an array nums consisting of positive integers. You can perform the following operation on the array any number of times: Choose any two ......
[LeetCode] 1676. Lowest Common Ancestor of a Binary Tree IV
Given the root of a binary tree and an array of TreeNode objects nodes, return the lowest common ancestor (LCA) of all the nodes in nodes. All the nod ......
day08 字符串01
[344.反转字符串](https://leetcode.cn/problems/reverse-string/description/) ![](https://img2023.cnblogs.com/blog/1076992/202307/1076992-20230720003559456-20 ......
vue-day32-- VueComponet构造函数
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>VueCo ......
暑期留校DAY 2-4
这三天真的一门心思搞编译器的优化啊。意识到了自己没有学好C++智能指针是一件多大的错误,真就写代码一天,debug三天555。这几天的内存泄漏,重复析构,shared_ptr循环引用的错误真的快把我折磨疯了,这种知识我之前一点都不会的啊555555555不过还好,bug都改完了,优化工作暂时也就做到 ......
LeetCode之0661, 二维向量初始化
img[i][j]周围的单元格,img[i+i1][j+j1], i1=-1,0,1, j1=-1,0,1, 每个都判断一次。O(9*m*n) class Solution { public: std::vector<std::vector<int>> imageSmoother( std::vec ......
Leetcode之0709, 修改字符串
1 class Solution { 2 public: 3 string toLowerCase(string s) { 4 for(char &ch: s){ 5 if(ch>='A' && ch<='Z'){ 6 ch=tolower(ch); 7 } 8 } 9 return s; 10 } ......
vue--day31---组件的嵌套
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>组件的嵌套 ......
Day07_3.while循环
1.while循环介绍与基本使用: 2.while循环_死循环与效率问题: 3.循环的应用: 4.while循环的结束方式一: 5.while循环的结束方式二: 6.while循环嵌套与结束案例一: 7.while循环嵌套与结束案例二: 8.while+continue: 9.while+else: ......
vue-day30--vue组件的几个注意点
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>组件的几个 ......
[LeetCode] 2486. Append Characters to String to Make Subsequence
You are given two strings s and t consisting of only lowercase English letters. Return the minimum number of characters that need to be appended to th ......
c++ day 12
前几天一直在修改八字循环的包 今天和控制接了一下,可以输出转角和速度,希望到时候实车的时候可以一步到位吧。 今天开始整数据结构。 先来理解线性表 线性表(英语:Linear List)是由n(n≥0)个数据元素(结点)a[0],a[1],a[2]…,a[n-1]组成的有限序列。 其中: 数据元素的个 ......
[刷题记录Day4]Leetcode链表专题
# No.1 ## 题目 [两两交换链表中的节点](https://leetcode.cn/problems/swap-nodes-in-pairs/) ## 思路 - 模拟类型题目 - 两个节点前后交换,同时记住原来的下一个节点 - 虚拟头节点 ## 代码 ```Java public ListN ......
LeetCode 1201. Ugly Number III 数学+二分答案
An ugly number is a positive integer that is divisible by $a$, $b$, or $c$. Given four integers $n$, $a$, $b$, and $c$, return the $n$th ugly number. ......
初学C语言day03--数据类型及循环分支语句
##### 一、数据类型 ###### 为什么要对数据进行分类? 1、现实中的数据就是自带类别属性的 2、对数据进行分类可以节约内存存储空间、提高运行速度 ###### 存储空间的单位: Bit 比特 存储一个二进制位,只能存储0或者1,计算机存储数据的最小单位 Byte 字节 存储八个二进制位,计 ......
Day07_2.深浅copy之深copy
使用场景:如果需要拷贝一个列表,并且让两个列表的改操作完全独立开,就用深copy,否则就用浅copy深拷贝:把可变和不可变类型做了区分对待,不可变类型的指向的还是原来的值id不变,可变类型指向的是新的值id改变 1.深拷贝在拷贝原列表后会产生一个新列表id不相同: 2.深拷贝可变类型数据内的单个数据 ......
初学C语言day02--编译c语言过程及文件类型
##### printf/scanf 是标准库的输出输入函数,一般用于调试代码 ```c printf(" \n"); xxxx printf(" \n"); ``` ##### 转义字符:键盘上有一些不好直接表示的符号,通过一些特殊字符搭配来表示,这种字符搭配称为转移字符 1. \n 换行 2. ......
Python基础day48
伪类选择器、伪元素选择器、选择器的优先级和CSS属性相关(宽和高、字体属性、文本颜色、文字属性、背景属性、边框、display属性、CSS盒子模型、float浮动、浮动带来的影响) ......
Day07_1.深浅copy之浅copy
浅拷贝原理: 是把原列表第一层的内存地址不加区分的完全copy一份给新列表 1.深浅copy之浅copy_1: 2.浅拷贝的id不同: 3.浅copy列表的内部元素是指向同一个的,所以单个元素的id相同: ......
LeetCode 875. Koko Eating Bananas 二分答案
Koko loves to eat bananas. There are $n$ piles of bananas, the $i$th pile has $piles[i]$ bananas. The guards have gone and will come back in `h` hours ......
day83(2023.7.19)
1.使用SqlSession操作数据库 2.Mapper动态代理原理 3. MyBatis新增 运行结果: 4.MyBatis修改 没优化前: 优化后:(只需写一次就ok了) 运行结果: 4.MyBatis删除、根据Id查询 运行结果: 5.根据ID查询用户 和运行结果 6.MyBatis模糊查询 ......