Insertion Sort 삽입정렬 Insert an element in the sorted subarray to its left. 두번째 Index를 시작으로 자신보다 앞 쪽 (왼쪽) 의 값과 계속 비교해가면서 자리를 옮겨나가는 알고리즘이다. How the Insertion array works int arr[] = [3,5,1,4,2] partial sorted subarray partial unsorted array [3] [5,1,4,2] [3,5] [1,4,2] [3,5,1] -> [3,1,5] -> [1,3,5] [4,2] [1,3,5,4] -> [1,3,4,5] [2] [1,3,4,5,2] -> [1,3,4,2,5] -> [1,3,2,4,5] -> [1,2,3,4,5] [] Solution ..
Read CSV File and store the data to MySQL in database table. CSV File에서 가지고 온 데이터를 MySQL DB에 저장하기 Use preparedStatement object to insert data to MySQL. You can use Statement object to insert Statement statement = conn.createStatement(); PreparedStatement is more secure so, it's preferred. PreparedStatement st = conn.prepareStatement(query); *SELECT query createStatement() setString(int, String) ..
When ArrayList is needed from another class, use get/set method to return the list 다른 class에 있는 ArrayList를 사용하고 싶을 때는 get/set 메서드를 이용해서 불러오면 된다. Example code I class 1 import java.util.ArrayList; import java.util.Iterator; public class Main { public static void main(String[] args) { AnotherClass anotherClass = new AnotherClass(); anotherClass.addList(); ArrayList list = anotherClass.getList(); I..
MySQL 시작 mysql -u root -p MySQL 비밀번호 입력 **** 전체 db보기 mysql> show databases; 특정 db 로 이동 mysql> use 이름; 이름(); mysql> create table [table name] (); CREATE TABLE customers( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NULL, phone VARCHAR(255) NULL, email VARCHAR(255) NULL, account_num VARCHAR(255) NULL, address VARCHAR(255) NULL, PRIMARY KEY (id) ); 전체 테이블 보기 mysql> show tables; 특정 테이블 보기 mysql..
Terminal Command ls - list files pwd - path of working directory \q - quit exit - quit cp - copy mkdir - make directory mv 'file' 'location' - move file to the location open - open file cat - read/write file nano - text editor rm - remove vi - text editor Vi command :q - quit i - insert :w - write dw - delete word dd - delete line
Error The server time zone value 'EDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support. Start MySQL mysql -u root -p Change directory to search my.cnf cd /usr/local/etc/my.cnf Check "my.cnf" File cat my.cnf add ..
- Total
- Today
- Yesterday
- math.max
- 프로그래머스 알고리즘문제
- compareTo()
- 알고리즘
- spring boot application
- javascript
- hackerrank solution
- HackerRank Algorithm
- 프로그래머스 알고리즘
- 프로그래머스
- Collection Framework
- rest parameter
- code refactoring
- repeat()
- hackerrank javascript solution
- ... in Javascript
- Javascript Algorithm
- hackerrank
- equals()
- java
- substring()
- easy javascript algorithm
- easy algorithm
- Object type casting
- math.abs
- C++
- string class in java
- hackerrank javascript
- algorithm
- HashMap
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |