일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- NIO
- BFS
- dfs
- union_find
- Union-find
- Java
- map
- math
- Calendar
- deque
- javascript
- string
- priority_queue
- alter
- scanner
- 스프링부트
- html
- 리소스모니터링
- JPA
- 스택
- 큐
- date
- sql
- List
- GC로그수집
- set
- CSS
- 힙덤프
- spring boot
- Properties
- Today
- Total
목록분류 전체보기 (309)
매일 조금씩

[출처] c++ new의 사용법, malloc과의 차이(free, delete) (tistory.com) c++ new의 사용법, malloc과의 차이(free, delete) ※컴퓨터의 메모리 구조를 알고 보시면 더 쉽게 이해할 수 있습니다. 메모리 구조 보러가기(클릭) 프로그램을 만들다 보면 상황에 따라 추가적인 메모리 공간을 실시간으로 확보해야 할 경우 hwan-shell.tistory.com 프로그램을 만들다 보면 상황에 따라 추가적인 메모리 공간을 실시간으로 확보해야 할 경우가 많습니다. 예를 들자면 채팅 대화방에 2명이 접속해 있는데 3명이 더 추가 접속을 했다거나 컴퓨터에 자료를 추가적으로 입력해 저장해야 하거나 등.... 여러가지 경우가 있습니다. 이것은 컴퓨터의 소프트웨어 사용시 변화가 ..

1. 시간 복잡도 : 알고리즘 실행 속도 2. 공간 복잡도 : 알고리즘이 사용하는 메모리 사이즈 (요즘은 잘안함) 알고리즘의 시간복잡도 주요요소는? 반복문! 알고리즘 성능 표기법 Big O (빅-오) 표기법 : O(N) 알고리즘 최악의 실행시간을 표기 가장 많이/일반적으로 사용함 아무리 최악의 상황이라도, 이정도의 성능은 보장한다는 의미이기 때문 Ω (오메가) 표기법 : Ω(N) 오메가 표기법은 알고리즘 최상의 실행시간을 표기 Θ (세타) 표기법 : Θ(N) 오메가 표기법은 알고리즘 평균 실행 시간을 표기 시간 복잡도 계산은 반복문이 핵심 요소임을 인지하고, 계산 표기는 최상, 평균, 최악 중, 최악의 시간인 Big-O 표기법을 중심으로 익히면 됨 대문자 O 표기법 입력 n에 따라 결정되는 시간 복잡도 ..

#include #include #include using namespace std; int solution(vector routes) { int answer = 1; sort(routes.begin(), routes.end()); int tmp = routes[0][1]; for(int i = 0; i routes[i][1]) tmp = routes[i][1]; if(tmp < routes[i+1][0]){ answer++; tmp = routes[i+1][1]; } } return answer; }

#include #include #include using namespace std; bool cmp(vector node1, vector node2){ return node1[2] < node2[2]; } int getParent(vector& parent, int node){ if(parent[node] == node) return node; return parent[node] = getParent(parent, parent[node]); } void unionParent(vector& parent, int node1, int node2){ int parent1 = getParent(parent, node1); int parent2 = getParent(parent, node2); if(parent1..

#include #include #include using namespace std; int solution(vector people, int limit) { int answer = 0; int boat = 0; sort(people.begin(), people.end()); int begin = 0; int end = people.size()-1; while(begin

#include #include #include #include using namespace std; string solution(string number, int k) { stack st; int size = number.length() - k; for(int i = 0; i 0){ if(st.top() < num ){ st.pop(); k--; } else{ break; } } st.push(num); } while(st.size() != size){ st.pop(); } string answer = ""; while(!st.empty()){ answer += st.top(); s..