leetcode day9 day

LeetCode 双周赛 102,模拟 / BFS / Dijkstra / Floyd

本文已收录到 AndroidFamily,技术和职场问题,请关注公众号 [彭旭锐] 提问。 大家好,欢迎来到小彭的 LeetCode 周赛解题报告。 昨晚是 LeetCode 双周赛第 102 场,你参加了吗?这场比赛比较简单,拼的是板子手速,继上周掉大分后算是回了一口血 😁。 2618. 查询网 ......
LeetCode Dijkstra Floyd 102 BFS

【前缀和】LeetCode 523. 连续的子数组和

题目链接 523. 连续的子数组和 思路 参考宫水三叶大佬题解 一开始以为和 Leetcode 53 Maximum Subarray 思路差不多,都是求子数组的值。但是后来发现在53题中并没有求出每个子数组的和,只是在贪心的情况下求出了可能的最大和 代码 class Solution { publ ......
前缀 数组 LeetCode 523

[LeetCode] 1042. Flower Planting With No Adjacent

You have n gardens, labeled from 1 to n, and an array paths where paths[i] = [xi, yi] describes a bidirectional path between garden xi to garden yi. I ......
LeetCode Adjacent Planting Flower 1042

Java-Day-9(IDE工具 + 包 + 访问修饰符 + 面向对象编程的三大特征)—— Java 中级

Java-Day-9 IDE ( 集成开发环境 ) 工具 Intellij IDEA Eclipse ( 以上两种工具的安装会另行编写随笔 ) IDEA代码常用快捷键 配置:File — settings — Keymap — 搜索、自查 — 右键 Reset Shortcuts 删除已有 — 右键 ......
Java Java-Day 特征 对象 三大

Python学习——Day3

一、运算符 1、算术运算符 int,float=>数字类型 2、赋值运算符 ①增量赋值 ②交叉赋值 交叉赋值就像是c语言中值的互换,但这里比c语言中要更简洁 ③链式赋值 ④解压赋值 解压赋值就是把列表/字典里的多个值释放出来,这里的k就相当于是一个压缩包,把值赋给了a,b,c,d 注意:解压赋值要求 ......
Python Day3 Day

day01-Redis入门

Redis入门 1.初始Redis 1.1认识NoSQL | | SQL(关系型数据库) | NoSQL(非关系型数据库) | | | | | | 数据结构 | 结构化(Structured) | 非结构化 | | 数据关联 | 关联的(Relational) | 无关联的 | | 查询方式 | S ......
Redis day 01

day46(2023.4.15)

1.多表查询 2.迪卡尔乘积 3.等值连接 4.非等值连接 5.自连接 6.99交叉连接 7.99自然连接 8.99内连接 9.外连接查询 10.多表查询,连接小练习 day46(2023.4.15) ......
2023 day 46 15

团队项目Scrum冲刺-day4

| 这个作业属于哪个课程 | 2023软件工程—双学位 | | | | | 这个作业要求在哪里 | 团队作业4——项目冲刺 | | 这个作业目标 | 团队项目Scrum冲刺-day4 | 1.会议 1.1昨日已完成工作 | 队员 | 任务 | | | | | 翟张博、沈炜杰 | 部分前端课表的wxm ......
团队 项目 Scrum day4 day

scrum项目冲刺_Day4会议总结

今日团队任务: 图片转excel(5天) 前端开发(需团队风格统一) 调用接口(后端),json数据->excel 前后端连接 任烁玚(进行中) 图片转html(8天) 前端开发(需团队风格统一) 图片转为pdf(存储) pdf转html(调用接口)[html存储到数据库] 前后台数据同步 孟德昊( ......
会议 项目 scrum Day4 Day

day09 react完整手写

实现Hooks的数据结构 fiberNode中可用的字段: memoizedState updateQueue 实现useState 包括2方面工作: 实现mount时useState的实现 实现dispatch方法,并接入现有更新流程内 ......
react day 09

Day4

3.代码示例 #include<iostream> using namespace std; int main(){ int a1,a2,a3,a4,s,m; for(a1=0;a1<=9;a1++){ for(a3=0;a3<=9;a3++){ if(a1!=a3){ s=a1*1000+a1*1 ......
Day4 Day

自学Python爬虫笔记(day7)

环境python3.9版本及以上,开发工具pycharm requests的进阶使用: 案例一 模拟用户登录-处理cookie: # 登录 -> 得到cookie # 带着cookie 去请求到暑假url -> 书架上的内容 # 必须把上面两个操作连起来 # 我们可以使用session进行请求 -> ......
爬虫 笔记 Python day7 day

LeetCode 115. 不同的子序列

class Solution { public: long long f[1010][1010];//f[i][j]表示s前i个字符得到t前j个字符的所有方案 int numDistinct(string s, string t) { f[0][0]=1; int n=s.size(),m=t.si ......
序列 LeetCode 115

day32| 122+55+45

122. 买卖股票的最佳时机 给你一个整数数组 prices ,其中 prices[i] 表示某支股票第 i 天的价格。 在每一天,你可以决定是否购买和/或出售股票。你在任何时候 最多 只能持有 一股 股票。你也可以先购买,然后在 同一天 出售。 返回 你能获得的 最大 利润 。 思路: 1. 可以 ......
day 122 32 55 45

day 6 牛顿迭代法求根

1.由f(x)计算f(x)的导数; 2.输入一个X,并让其作为X0进行计算; 3.反复迭代X,直到|x-x0|<=1e-5; 4.输出当前X; #include<iostream>#include<math.h>using namespace std; int main(){ float X,X0, ......
迭代法 day

LeetCode/最大化城市的最小供电站数目

政府批准了可以额外建造 k 座供电站,你需要决定这些供电站分别应该建在哪里,这些供电站与已经存在的供电站有相同的供电范围。 给你两个整数 r 和 k ,如果以最优策略建造额外的发电站,返回所有城市中,最小供电站数目的最大值是多少。 ###一. 二分法+前缀和+贪心 分析:最大化最小值,首先考虑使用二 ......
供电站 数目 LeetCode 城市

Day3

3.代码示例 #include<iostream> using namespace std; int main(){ int year,month,day,sum,s=0,i,q; cin>>year>>month>>day; int a[13]={0,31,28,31,30,31,30,31,31 ......
Day3 Day

团队项目Scrum冲刺-day3

| 这个作业属于哪个课程 | 2023软件工程—双学位 | | | | | 这个作业要求在哪里 | 团队作业4——项目冲刺 | | 这个作业目标 | 团队项目Scrum冲刺-day3 | 1.会议 1.1昨日已完成工作 | 队员 | 任务 | | | | | 翟张博、沈炜杰 | 完善用户登录界面,并 ......
团队 项目 Scrum day3 day

leetcode-1337-easy

The K Weakest Rows in a Matrix You are given an m x n binary matrix mat of 1's (representing soldiers) and 0's (representing civilians). The soldiers ......
leetcode 1337 easy

leetcode-1342-easy

Number of Steps to Reduce a Number to Zero Given an integer num, return the number of steps to reduce it to zero. In one step, if the current number i ......
leetcode 1342 easy

leetcode-1360-easy

Number of Days Between Two Dates Write a program to count the number of days between two dates. The two dates are given as strings, their format is YY ......
leetcode 1360 easy

leetcode-766-easy

Toeplitz Matrix Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top ......
leetcode easy 766

leetcode-806-easy

Number of Lines To Write String You are given a string s of lowercase English letters and an array widths denoting how many pixels wide each lowercase ......
leetcode easy 806

leetcode-812-easy

Largest Triangle Area Given an array of points on the X-Y plane points where points[i] = [xi, yi], return the area of the largest triangle that can be ......
leetcode easy 812

leetcode-830-easy

Positions of Large Groups In a string s of lowercase letters, these letters form consecutive groups of the same character. For example, a string like ......
leetcode easy 830

leetcode-844-easy

Backspace String Compare Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace c ......
leetcode easy 844

leetcode-944-easy

Delete Columns To Make Sorted You are given an array of n strings strs, all of the same length. The strings can be arranged such that there is one on ......
leetcode easy 944

day45 (2023.4.14)

1.SQL函数的介绍 2.函数的分类 3.单行函数 4.单行函数(字符函数) 5.单行函数(数字函数) 6.单行函数(日期函数) 7.单行函数(转换函数) 8.单行函数(通用函数) 9.单行函数,小练习 day45(2023.4.14) ......
2023 day 45 14

scrum项目冲刺_Day3会议总结

今日团队任务: 图片转excel(5天) 前端开发(需团队风格统一) 调用接口(后端),json数据->excel 前后端连接 任烁玚(进行中) 图片转html(8天) 前端开发(需团队风格统一) 图片转为pdf(存储) pdf转html(调用接口)[html存储到数据库] 前后台数据同步 孟德昊( ......
会议 项目 scrum Day3 Day

docker_day04:Dockerfile docker私有仓库 dockercompose介绍 dockercompose部署 一件部署路飞项目

回顾 # 容器其他操作 docker start 容器id 启动容器 docker stop 容器id 停止容器 docker rm 容器id 删除容器 docker rm `docker ps -aq` 删除所有容器 docker exec -it 容器id 命令 进入容器 docker cp 宿 ......