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 | 31 |
Tags
- 코딩테스트
- array
- Binary Search
- Matrix
- Method
- dynamic programming
- sorting
- Binary Tree
- Data Structure
- 구현
- 코테
- SQL
- implement
- 자바
- bit manipulation
- Stack
- greedy
- geometry
- Counting
- java
- Number Theory
- Tree
- two pointers
- Class
- 파이썬
- database
- string
- simulation
- Math
- hash table
Archives
- Today
- Total
목록배열 (2)
코린이의 소소한 공부노트
Add Array Members
1. Problem - S에 있는 모든 요소를 더하자 2. Input 1) 양수 n 2) 배열 S indexed from 1 to n 3. Output 1) S의 요소를 모두 더한 결과 4. PseudoCode number sum(int n, const number S[]){ index i; number result = 0; for(i=1 ; i
Back-End/Algorithm
2023. 2. 22. 20:09

Arrays클래스는 배열 관련 메서드를 모아놓은 클래스이다. 이 중 많이 쓰는 메서드 몇 가지를 보려 한다. 1. 배열의 내용을 문자열로 출력하기 1) 1차원 배열의 내용을 출력할 때 이용하는 메서드 toString() int[] arr1d = {0, 1, 2, 3}; System.out.println(Arrays.toString(arr1d)); // [0, 1, 2, 3] 2) 2차원 이상의 배열의 내용을 출력할 때 이용하는 메서드 deepToString() int[][] arr2d = { {00, 01}, {10, 11} }; System.out.println(Arrays.deepToString(arr2d)); // [[0, 1], [10, 11]] // 2차원 배열에 toString()을 쓰면 어떻..
Java
2022. 2. 20. 15:21