Browse Source

Site updated: 2022-08-28 22:30:16

master
nicksxs 3 years ago
parent
commit
b2501ede68
10 changed files with 3004 additions and 2960 deletions
  1. +2
    -2
      2017/04/25/rabbitmq-tips/index.html
  2. +2
    -2
      2019/06/18/openresty/index.html
  3. +1
    -1
      2021/02/07/关于读书打卡与分享/index.html
  4. +1
    -1
      2021/07/18/2021-年中总结/index.html
  5. +19
    -19
      baidusitemap.xml
  6. +44
    -0
      code/Solution1260.java
  7. +1
    -1
      leancloud_counter_security_urls.json
  8. +2308
    -2308
      search.xml
  9. +625
    -625
      sitemap.xml
  10. +1
    -1
      tags/java/page/3/index.html

+ 2
- 2
2017/04/25/rabbitmq-tips/index.html
File diff suppressed because it is too large
View File


+ 2
- 2
2019/06/18/openresty/index.html
File diff suppressed because it is too large
View File


+ 1
- 1
2021/02/07/关于读书打卡与分享/index.html
File diff suppressed because it is too large
View File


+ 1
- 1
2021/07/18/2021-年中总结/index.html
File diff suppressed because it is too large
View File


+ 19
- 19
baidusitemap.xml View File

@ -89,11 +89,11 @@
<lastmod>2022-06-11</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2021/09/04/%E8%81%8A%E4%B8%80%E4%B8%8B-RocketMQ-%E7%9A%84%E6%B6%88%E6%81%AF%E5%AD%98%E5%82%A8/</loc>
<loc>https://nicksxs.me/2021/10/03/%E8%81%8A%E4%B8%80%E4%B8%8B-RocketMQ-%E7%9A%84%E6%B6%88%E6%81%AF%E5%AD%98%E5%82%A8%E4%B8%89/</loc>
<lastmod>2022-06-11</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2021/10/03/%E8%81%8A%E4%B8%80%E4%B8%8B-RocketMQ-%E7%9A%84%E6%B6%88%E6%81%AF%E5%AD%98%E5%82%A8%E4%B8%89/</loc>
<loc>https://nicksxs.me/2021/12/12/%E8%81%8A%E8%81%8A-Sharding-Jdbc-%E7%9A%84%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8/</loc>
<lastmod>2022-06-11</lastmod>
</url>
<url>
@ -101,7 +101,7 @@
<lastmod>2022-06-11</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2021/12/12/%E8%81%8A%E8%81%8A-Sharding-Jdbc-%E7%9A%84%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8/</loc>
<loc>https://nicksxs.me/2021/09/04/%E8%81%8A%E4%B8%80%E4%B8%8B-RocketMQ-%E7%9A%84%E6%B6%88%E6%81%AF%E5%AD%98%E5%82%A8/</loc>
<lastmod>2022-06-11</lastmod>
</url>
<url>
@ -189,11 +189,11 @@
<lastmod>2022-06-11</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2021/09/26/%E8%81%8A%E4%B8%80%E4%B8%8B-SpringBoot-%E4%B8%AD%E5%8A%A8%E6%80%81%E5%88%87%E6%8D%A2%E6%95%B0%E6%8D%AE%E6%BA%90%E7%9A%84%E6%96%B9%E6%B3%95/</loc>
<loc>https://nicksxs.me/2021/09/19/%E8%81%8A%E4%B8%80%E4%B8%8B-SpringBoot-%E4%B8%AD%E4%BD%BF%E7%94%A8%E7%9A%84-cglib-%E4%BD%9C%E4%B8%BA%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86%E4%B8%AD%E7%9A%84%E4%B8%80%E4%B8%AA%E6%B3%A8%E6%84%8F%E7%82%B9/</loc>
<lastmod>2022-06-11</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2021/09/19/%E8%81%8A%E4%B8%80%E4%B8%8B-SpringBoot-%E4%B8%AD%E4%BD%BF%E7%94%A8%E7%9A%84-cglib-%E4%BD%9C%E4%B8%BA%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86%E4%B8%AD%E7%9A%84%E4%B8%80%E4%B8%AA%E6%B3%A8%E6%84%8F%E7%82%B9/</loc>
<loc>https://nicksxs.me/2021/09/26/%E8%81%8A%E4%B8%80%E4%B8%8B-SpringBoot-%E4%B8%AD%E5%8A%A8%E6%80%81%E5%88%87%E6%8D%A2%E6%95%B0%E6%8D%AE%E6%BA%90%E7%9A%84%E6%96%B9%E6%B3%95/</loc>
<lastmod>2022-06-11</lastmod>
</url>
<url>
@ -584,6 +584,10 @@
<loc>https://nicksxs.me/2014/12/24/MFC%20%E6%A8%A1%E6%80%81%E5%AF%B9%E8%AF%9D%E6%A1%86/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2019/12/10/Redis-Part-1/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2015/03/11/Reverse-Bits/</loc>
<lastmod>2020-01-12</lastmod>
@ -601,19 +605,15 @@
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2016/08/14/docker-mysql-cluster/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2016/10/11/minimum-size-subarray-sum-209/</loc>
<loc>https://nicksxs.me/2016/09/29/binary-watch/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2019/12/10/Redis-Part-1/</loc>
<loc>https://nicksxs.me/2016/08/14/docker-mysql-cluster/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2016/09/29/binary-watch/</loc>
<loc>https://nicksxs.me/2016/10/11/minimum-size-subarray-sum-209/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
@ -625,15 +625,15 @@
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2020/01/10/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E4%B8%89/</loc>
<loc>https://nicksxs.me/2019/12/26/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2020/01/04/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E4%BA%8C/</loc>
<loc>https://nicksxs.me/2020/01/10/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E4%B8%89/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2019/12/26/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D/</loc>
<loc>https://nicksxs.me/2020/01/04/redis%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%BB%8B%E7%BB%8D%E4%BA%8C/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
@ -656,6 +656,10 @@
<loc>https://nicksxs.me/2015/01/04/Path-Sum/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2015/06/22/invert-binary-tree/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2014/12/23/my-new-post/</loc>
<lastmod>2020-01-12</lastmod>
@ -680,10 +684,6 @@
<loc>https://nicksxs.me/2016/07/13/swoole-websocket-test/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2015/06/22/invert-binary-tree/</loc>
<lastmod>2020-01-12</lastmod>
</url>
<url>
<loc>https://nicksxs.me/2019/12/21/%E8%81%8A%E8%81%8AJava%E4%B8%AD%E7%9A%84%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F/</loc>
<lastmod>2019-12-22</lastmod>


+ 44
- 0
code/Solution1260.java View File

@ -0,0 +1,44 @@
public class Solution1260 {
public List<List<Integer>> shiftGrid(int[][] grid, int k) {
// 行数
int m = grid.length;
// 列数
int n = grid[0].length;
// 偏移值取下模
k = k % (m * n);
// 反向取下数量因为我打算直接从头填充新的矩阵
/*
* 比如
* 1 2 3
* 4 5 6
* 7 8 9
* 需要变成
* 9 1 2
* 3 4 5
* 6 7 8
* 就要从 9 开始填充
*/
int reverseK = m * n - k;
List<List<Integer>> matrix = new ArrayList<>();
// 这类就是两层循环
for (int i = 0; i < m; i++) {
List<Integer> line = new ArrayList<>();
for (int j = 0; j < n; j++) {
// 数量会随着循环迭代增长, 确认是第几个
int currentNum = reverseK + i * n + (j + 1);
// 这里处理下到达矩阵末尾后减掉 m * n
if (currentNum > m * n) {
currentNum -= m * n;
}
// 根据矩阵列数 n 算出在原来矩阵的位置
int last = (currentNum - 1) % n;
int passLine = (currentNum - 1) / n;
line.add(grid[passLine][last]);
}
matrix.add(line);
}
return matrix;
}
}

+ 1
- 1
leancloud_counter_security_urls.json
File diff suppressed because it is too large
View File


+ 2308
- 2308
search.xml
File diff suppressed because it is too large
View File


+ 625
- 625
sitemap.xml
File diff suppressed because it is too large
View File


+ 1
- 1
tags/java/page/3/index.html
File diff suppressed because it is too large
View File


Loading…
Cancel
Save