Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[이지민] - 222-풀링, 종이의 개수, N번째 큰 수, 택배 배달과 수거하기 #212

Merged
merged 4 commits into from
Mar 3, 2024

Conversation

jeeminimini
Copy link
Member

📌 from issue #210 📌

📋문제 목록📋

222-풀링: ✅
종이의 개수: ✅
N번째 큰 수: ✅
택배 배달과 수거하기: ✅

@jeeminimini jeeminimini self-assigned this Mar 3, 2024
Copy link
Member

@soopeach soopeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요!

int result = 0;

while (cnt < n) {
Arrays.sort(numbers, Comparator.comparing((ArrayList<Integer> num1) -> num1.get(num1.size() -1)).reversed());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자바는 쉽지않네요

Comment on lines +24 to +28
for (i in x until x + divisor step divisor / 3) {
for (j in y until y + divisor step divisor / 3) {
setRecursion(papers, i, j, divisor / 3)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요 부분을 이렇게 깔끔하게 뺄 수 있었군요..!

Comment on lines +26 to +36
while (n > 1) {
for (int i = 0; i < n; i += 2) {
for (int j = 0; j < n; j += 2) {
int [] polling = {numbers[i][j], numbers[i + 1][j], numbers[i][j + 1], numbers[i + 1][j + 1]};
Arrays.sort(polling);
numbers[i / 2][j / 2] = polling[2];
}
}

n /= 2;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엄청 깔끔하게 처리하셨네요!

Comment on lines +30 to +32
while (cnt < n) {
Arrays.sort(numbers, Comparator.comparing((ArrayList<Integer> num1) -> num1.get(num1.size() -1)).reversed());

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

끝에만 넣구 sort 하시는 생각 굿입니다!👍👍

Comment on lines +24 to +28
for (i in x until x + divisor step divisor / 3) {
for (j in y until y + divisor step divisor / 3) {
setRecursion(papers, i, j, divisor / 3)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

생각보다 매우 간단한 작업이였던...🙂

Comment on lines +26 to +36
while (n > 1) {
for (int i = 0; i < n; i += 2) {
for (int j = 0; j < n; j += 2) {
int [] polling = {numbers[i][j], numbers[i + 1][j], numbers[i][j + 1], numbers[i + 1][j + 1]};
Arrays.sort(polling);
numbers[i / 2][j / 2] = polling[2];
}
}

n /= 2;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

배열을 새로 안 만들고 필요한 부분만 수정하는 게 좋았습니다!👍

@jeeminimini jeeminimini merged commit 1ebaa07 into main Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants