#. Problemhttps://www.inflearn.com/course/%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98* The copyright in this matter is in Inflearn #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to im..
#. Problemhttps://www.inflearn.com/course/%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98* The copyright in this matter is in Inflearn #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to im..
#. HashSet - Hash Table에 의한 동작 - 집단을 반복(iterator)하려면 HashSet 인스턴스의 크기(원소의 수)와 백업 HashMap 인스턴스의 용량(버킷 수)의 합계에 비례하는 시간이 필요. 따라서, 반복 성능이 중요한 경우 초기 용량을 너무 높게 설정하지 않는 것이 매우 중요 12345678910111213141516171819202122232425262728293031323334353637383940414243444546import java.util.*; // HashSet을 사용하기 위해 import public class test { public static void main(String[] args) { HashSet hs = new HashSet(); // HashS..
참고글 : [Python] Numpy 배열(생성, 색인, 연산 ..) # 메서드의 메뉴얼 확인np.arange? Docstring: # Enter : 계속, q: 종료arange([start,] stop[, step,], dtype=None) Return evenly spaced values within a given interval.... np.func?? # 함수의 코드 제공 # 정보 확인arr1 = np.arange(10).reshape(2,5) arr1.shape # 배열의 모양 확인 메서드(2, 5) arr1.dtype # 배열의 데이터 타입 확인 메서드dtype('int32') arr1.ndim # 배열의 차원 확인2 type(arr1)numpy.ndarray # 모양 변경 (a.reshape..
참고글 : [Python] 리스트 (list) 리스트의 메서드 # insert() : 리스트의 특정 위치에 요소 삽입>>> test1 = [1,2,3]>>> test1.insert(1, 10) # 두 번째위치에 10 삽입>>> test1[1, 10, 2, 3] # append() : 리스트 끝에 요소 삽입>>> test1 = [1,2,3]>>> test1.append(5)>>> test1[1, 2, 3, 5] # clear() : 리스트 내용 모두 삭제>>> test1 = [1,2,3]>>> test1.clear()>>> test1[] # del() : 리스트의 특정 위치 요소 삭제>>> test1 = [1,2,3]>>> del(test1[1])>>> test1[1, 3] # remove() : 리스트의..
데이터 그룹 연산을 위한 주요 함수 정리 1. apply 계열 적용 함수 1. apply(matrix, margin, function, ...) : '행/열별' 함수에 반복적 적용(연산)의 위해 사용 => 그룹함수 연산 - 2차원 구조 적용 가능, 벡터에 적용 불가 - 행별, 열별 연산을 위해 만들어짐 - 그룹함수의 적용과 함께 사용 가능 - 행/열별 "벡터"로 묶어서 함수에 전달하므로 함수는 하나의 인자를 가져야 함 > m1 apply(m1,1,sum) # 행별 sum[1] 12 15 18> apply(m1,2,sum) # 열별 sum[1] 6 15 24 2. lapply(list, function) : '원소별' 함수에 반복적 적용(연산)을 위해 사용 (리스트로 리턴) - 리스트와 데이터 프레임(ke..
요약 order() : 정렬된 쉘의 위치 값 리턴, 색인으로 데이터 정렬 / 전체 데이터 정렬 가능sort() : 정렬된 데이터 바로 리턴 / 전체 데이터 정렬 불가능orderBy() : 정렬된 데이터 바로 리턴 / 전체 데이터 정렬 가능 데이터 정렬 R에서 데이터를 정렬하는 함수는 order(), sort)(), doBy::orderby() 함수가 있습니다.주로 order(), sort() 함수가 많이 사용됩니다. # 데이터 준비> v1 v2 order(v1) # 2번째 값이 가장 큰 것을 확인[1] 1 3 5 4 2> v1[order(v1)] # 색인을 통해 정렬된 값 출력 [1] 1 2 3 5 10> v2[order(v2)] # NA를 맨 끝으로 배치(default)[1] 1 2 3 5 10 NA>..