일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- stateful widget 생명주기
- 호출스택
- 참조형 반환타입
- this()
- this()와 참조변수 this 차이점
- stateful widget
- FLUTTER
- 운영체제의 분류
- 기본형 매개변수
- 운영체제의 목적
- 명예의전당(1)
- static 메서드
- 인스턴스 메서드
- 운영체제의 구조
- static import문
- 운영체제의 예
- object클래스
- stateless widget
- 이것이코딩테스트다
- 오버로딩
- webview_flutter
- 프로그래머스
- 오버라이딩과 오버로딩 차이점
- 참조형 매개변수
- 조상의 생성자
- 초기화 순서
- 객체 배열
- 운영체제란 무엇인가
- 클래스 변수
- PriorityQueue
- Today
- Total
목록알고리즘 공부 (13)
Coram Deo
1. 나의 풀이(선택정렬 사용)실패율 구하는 데까지는 시간이 얼마 안걸렸는데, 실패율이 높은 스테이지부터 내림차순으로 스테이지의 번호가 담겨있는 배열을 정렬하는 게 좀 오래걸렸다. 보통 자바에서 정렬할때는 Arrays.sort()를 사용했었는데, 이 문제에서는 인덱스 값을 정렬해야하니 조금 더 복잡했던 것 같다.class Solution { public int[] solution(int N, int[] stages) { int[] answer = new int[N]; int clearUsers = stages.length; double[] failureRate = new double[N]; // 실패율 구하기 for(i..
- 제곱근을 이용하여 약수를 구한 풀이class Solution { public int solution(int number, int limit, int power) { // 약수 구할 때 제곱근 이용해서 구해야 시간초과 안남 ! // 1~number까지 숫자들의 약수 개수를 각각 구하여 배열에 넣는다. // 배열안의 숫자중 limit보다 큰 숫자는 power로 대체한다. // 배열의 모든 원소의 총합을 구한다. int answer = 0; int[] yaksuArr = new int[number]; for(int i=0; i
- substring을 이용한 풀이substring을 이용하여 주어진 인덱스 n에 해당하는 문자를 원래 문자열의 맨앞에 붙인 다음 정렬해준다.정렬이 끝나면 맨 앞글자 빼고 answer배열에 넣어준다.import java.util.*;class Solution { public String[] solution(String[] strings, int n) { // substring을 이용하자 ! String[] answer = new String[strings.length]; for(int i=0; i
1. 나의 풀이import java.util.*; class Solution { public int[] solution(int[] array, int[][] commands) { // array를 i부터 j까지 잘라서 다른 배열에 옮긴다. // 새로운 array를 정렬한다. // k번째 인덱스에 해당하는 새로운 array값을 answer배열에 넣는다. int[] answer = new int[commands.length]; int j=0; for(int[] command : commands){ int length = command[1] - command[0] + 1; int[] newA..