| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
- TypeScript
- 변수
- react ag grid
- 자바 공배수
- 자바 스캐너
- 자바 조건문
- 자바 switch문
- 타입스크립트
- 자바 강제 캐스팅
- MySQL
- java
- 항해99
- 정보처리기사실기
- react with typescript
- 자바 구구단 출력
- 이클립스 DB연동
- 프로그래머스
- 조코딩
- 자바
- 자바 for문
- 자바 향상된 for문
- 자바 삼항연산자
- 자바 if문
- 자바 public
- 항해99 2기
- Til
- 자바 반복문
- 자바 while문
- Vue3
- 자바 자동캐스팅
- Today
- Total
목록Arrays.sort (2)
뇌 채우기 공간
import java.util.Arrays; import java.util.Comparator; public class solution { public String solution(int[] numbers) { String answer = ""; String[] str = new String[numbers.length]; for (int i = 0; i < numbers.length; i++) { str[i] = String.valueOf(numbers[i]); } Arrays.sort(str, new Comparator() { @Override public int compare(String a, String b) { return (b+a).compareTo(a+b); } }); if(str[0].equ..
1. 먼저 array를 commands[i][0] 인덱스 부터 commands[i][1]인덱스까지 자른다 2. 그 배열을 오름차순 정렬한다. 3. 그 배열에서 commands[i][2] 번째 수를 answer배열에 넣는다 ( 인덱스는 -1) 결과코드 package programm; import java.util.Arrays; public class solution { public int[] solution(int[] array, int[][] commands) { int[] answer = new int[commands.length]; for (int i = 0; i < commands.length; i++) { int[] copyarr = Arrays.copyOfRange(array, commands[..