Skip to content

Commit

Permalink
Merge pull request #4 from questionviper/master
Browse files Browse the repository at this point in the history
刘瑞在6月1日上交了周报
  • Loading branch information
dyx1234 authored Jun 1, 2024
2 parents f1cd06f + 83bb08e commit 7aa831a
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/ideacode.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions 刘瑞/week0/周报.md
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

0 comments on commit 7aa831a

Please sign in to comment.