Please open Telegram to view this post
VIEW IN TELEGRAM
🔥2
Well guys, I have completed my plan and carefully structured it. My challenge starts on Thursday because I know you don't care about the reason 🗿
Challenge Plan:
- Every day, I will read 15-20 pages from The Art of Invisibility by Kevin Mitnick. After every chapter, I will post my overall thoughts in this channel.
- Every day, I will solve one problem from LeetCode in java python kotlin (since we are learning it at university).
- Every day, I will watch a video from Professor Messer's channel related to my major. For now, I have chosen the Network+ certification course.
I believe this plan is enough because if the tasks are too difficult, motivation tends to decrease.
Wish me luck😐
@leetcode7
Challenge Plan:
- Every day, I will read 15-20 pages from The Art of Invisibility by Kevin Mitnick. After every chapter, I will post my overall thoughts in this channel.
- Every day, I will solve one problem from LeetCode in java python kotlin (since we are learning it at university).
- Every day, I will watch a video from Professor Messer's channel related to my major. For now, I have chosen the Network+ certification course.
I believe this plan is enough because if the tasks are too difficult, motivation tends to decrease.
Wish me luck
@leetcode7
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Leetcode contest
We have something for tomarrow :⌨️
@azamovme if this channel reaches 250 subscribers i send all of contest answers )
import java.util.*;
class Solution {
public int[][] sortMatrix(int[][] grid) {
int n = grid.length;
// Sort the bottom-left triangle diagonals (non-increasing order)
for (int d = 0; d < n; d++) {
List<Integer> diagonal = new ArrayList<>();
for (int i = d, j = 0; i < n && j < n; i++, j++) {
diagonal.add(grid[i][j]);
}
Collections.sort(diagonal, Collections.reverseOrder());
int index = 0;
for (int i = d, j = 0; i < n && j < n; i++, j++) {
grid[i][j] = diagonal.get(index++);
}
}
// Sort the top-right triangle diagonals (non-decreasing order)
for (int d = 1; d < n; d++) {
List<Integer> diagonal = new ArrayList<>();
for (int i = 0, j = d; i < n && j < n; i++, j++) {
diagonal.add(grid[i][j]);
}
Collections.sort(diagonal);
int index = 0;
for (int i = 0, j = d; i < n && j < n; i++, j++) {
grid[i][j] = diagonal.get(index++);
}
}
return grid;
}
}👍3