Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 코딩테스트
- sorting
- hash table
- Number Theory
- Tree
- Counting
- Data Structure
- Binary Tree
- Stack
- array
- SQL
- dynamic programming
- Method
- string
- greedy
- database
- Math
- 구현
- 코테
- geometry
- java
- 자바
- two pointers
- simulation
- bit manipulation
- Matrix
- implement
- Binary Search
- 파이썬
- Class
Archives
- Today
- Total
코린이의 소소한 공부노트
[프로그래머스/Lv.0] 카운트 업 본문
1. Input, Output, Example
- start부터 end까지의 숫자를 차례로 담은 리스트를 반환
2. Constraint
1) 0 ≤ start ≤ end ≤ 50
3. Code
1) 첫 코드(2023/04/24)
class Solution {
public int[] solution(int start, int end) {
int[] answer = new int[end-start+1];
for(int i=0 ; i<answer.length ; i++)
answer[i] = start+i;
return answer;
}
}
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[프로그래머스/Lv.0] 길이에 따른 연산 (0) | 2023.04.24 |
---|---|
[프로그래머스/Lv.0] 첫 번째로 나오는 음수 (0) | 2023.04.24 |
[프로그래머스/Lv.0] 조건에 맞게 수열 변환하기 3 (0) | 2023.04.24 |
[프로그래머스/Lv.0] 정수 찾기 (0) | 2023.04.24 |
[프로그래머스/Lv.0] 문자열의 뒤의 n글자 (0) | 2023.04.24 |