Merged
Conversation
JooKangsan
approved these changes
Jan 9, 2025
Collaborator
There was a problem hiding this comment.
정렬은 안해도 괜찮을것 같아요!!
const minNum = arr.sort((a, b) => a - b)[0];
answer.splice(answer.indexOf(minNum), 1);
이거는
answer.splice(answer.indexOf(Math.min(...arr)), 1)
이걸로 처리할수 있습니다!
Collaborator
There was a problem hiding this comment.
map을 사용해서 좀 더 간결하게 풀 수 있어요!
function solution(arr1, arr2) {
return arr1.map((row, i) => row.map((val, j) => val + arr2[i][j]));
}
Collaborator
Author
There was a problem hiding this comment.
그렇네요 ㅎㅎ 좋은 의견 감사합니다! 👍 😄
bona1122
pushed a commit
to bona1122/AlgorithmStudy
that referenced
this pull request
Jan 9, 2025
* 배열 자르기 / 기초 * 배열 원소의 길이 / 기초 * 배열 회전시키기 / 기초 * 중복된 숫자 개수 / 기초 * 제일 작은 수 제거하기 / 중급 * 행렬의 덧셈 / 중급 * 나누어 떨어지는 숫자 배열 / 중급 * 행렬의 곱셈 / 심화 * 배열 배운 것 정리 파일
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[배열]
📌 푼 문제
[기초]
[중급]
[심화]
📝 간단한 풀이 과정
중급까지는 쉽길래 심화까지 다 풀 수 있을 줄 알았는데.. 별 찍기에서 막혔다.. 🥲
2차원 배열 만드는 방법
📄 REFERENCE
https://joonfluence.tistory.com/508
행렬의 곱셈
교점에 별 만들기
교점 구하기 까지는 성공했다! 그러고 별 그릴 캔버스를 만들었는데 거기에 별을 그리다가 막혔다. 나중에 다시 시도해봐야지..