728x90
Arrays.fill을 이용한 배열 채우기
int[] arr= new int[5];
Arrays.fill(arr,1);//1차원 배열
Arrays.fill(arr,0,2,1); // 0~2 index까지 1로 채우기
int[][] arr2 = new int[5][5];
for (int[] a : arr2) { // 2차원 배열
Arrays.fill(a, 1);
}
알고리즘(등굣길)
https://school.programmers.co.kr/learn/courses/30/lessons/42898
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
https://github.com/yougeun6021/Algorithm/blob/master/src/Level3/WayToSchool.java
GitHub - yougeun6021/Algorithm
Contribute to yougeun6021/Algorithm development by creating an account on GitHub.
github.com
728x90
'Java' 카테고리의 다른 글
정적 팩토리 메소드의 장점과 단점 (0) | 2024.04.06 |
---|---|
BigInteger의 여러가지 메소드 (0) | 2022.12.04 |
stream을 활용한 2차원배열 합 (0) | 2022.11.27 |
약수 개수 알고리즘 (0) | 2022.11.24 |
Sliding Window 알고리즘 (0) | 2022.11.23 |