-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from questionviper/master
刘瑞在6月1日上交了周报
- Loading branch information
Showing
6 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## 0530 周报 | ||
#### 学习记录 | ||
*1.学习了git bash一些命令,了解了远程仓库和本地仓库的关联,和一些冲突的处理方式,这是相应的git笔记,https://blog.csdn.net/2301_79550362/article/details/139323869* | ||
*2.了解了一些互联网岗位,对互联网的工作内容和结构有了一定了解* | ||
#### 问题 | ||
*暂无* | ||
|
||
#### 刷题 | ||
* 做了两道简单题(每日一题),熟悉了一下java的语法,和leetcode | ||
* 2928.分糖,简单的循环遍历,下面是代码 | ||
```java | ||
class Solution { | ||
public int distributeCandies(int n, int limit) { | ||
int ans=0; | ||
for(int i=Math.min(n,limit);i>=0;i--) | ||
{ | ||
if(n-i<=limit) | ||
{ | ||
ans+=n-i+1; | ||
} | ||
else{ | ||
ans+=Math.max(0,limit-(n-i-limit)+1); | ||
} | ||
} | ||
return ans; | ||
} | ||
} | ||
``` | ||
* 2965.找到非重复数字 | ||
* 遍历吧嘶 | ||
```java | ||
class Solution { | ||
int[] findMissingAndRepeatedValues(int[][] grid) { | ||
int n=grid.length; | ||
int[] vis =new int[n*n+1]; | ||
int[] ans=new int[2]; | ||
for (int[] ints : grid) { | ||
for (int element : ints) { | ||
vis[element]++; | ||
if(vis[element]==2) | ||
{ | ||
ans[0]=element; | ||
} | ||
} | ||
|
||
} | ||
for(int i=1;i<=n*n;i++) | ||
{ | ||
if (vis[i]==0) | ||
{ | ||
ans[1]=i; | ||
} | ||
} | ||
return ans; | ||
|
||
} | ||
} | ||
``` | ||
这周就这样了,感觉好水hhhh |