| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 스프링사진
- 인스타클론
- 스프링부트사진올리기
- 도커설치하는법
- 스프링부트api
- 스프링부트서버에사진전송
- 출처 따배도
- 스프링부트중복예외처리
- 멀티폼
- 출처 코딩셰프
- 파이썬sort
- 스프링익셉션처리
- 스프링이미지업로드
- WAS웹서버
- 스프링사진업로드
- 스프링부트구독취소
- vm도커설치하는법
- dockerinstall
- 출처 문어박사
- springboot_exception_handler
- 스프링부트팔로우취소
- 스프링구독
- 스프링부트팔로잉
- 서버에도커설치
- centos도커설치
- 우분투도커설치
- 출처 메타코딩
- 스프링부트
- 출처 노마드코더
- ssh도커설치
- Today
- Total
목록Algorithm (66)
MakerHyeon
- 맵에서 키값은 중복이 불가하지만, value는 중복가능 - C++은 트리를 사용하여 O(logN), Python은 해쉬를 사용하여 O(1) 의시간복잡도를 가진다. 1) C++ - #include #include #include using namespace std; int main(void){ map m; m["Yoondy"]=40; m["Sky"]=100; m["Purry"]=70; printf("size: %d\n",m.size()); for(auto p:m) {printf("%d, %d\n",p.first, p.second);} } 2) Python m = {} m["Yoondy"] = 40 m["Sky"] = 100 m["Klera"]= 70 print("size:",len(m)) for k i..
- C++은 Max-heap(Root node가 최대값),Python은 Min-heap - C++은 파이썬과 달리, pop을 해도 반환값이 없다. - 삽입/삭제 시간복잡도 O(logN) 1) C++ priority_queue pq; pq.push(456); pq.push(123); pq.push(789); printf("size: %d\n",pq.size()); while(!pq.empty()){ printf("%d\n",pq.top()); pq.pop(); } 2) Python import heapq pq = [] heapq.heappush(pq,456) heapq.heappush(pq,123) heapq.heappush(pq,789) # [123,456,789] print("size:",len(pq)..
1. Stack 1) C++ // C++ stack s; s.push(123); s.push(456); s.push(789); printf("size: %d\n",s.size()); while(!s.empty()){ printf("%d\n",s.top()); s.pop(); } 2) Python # Python - 리스트이용 s = [] s.append(123) s.append(456) s.append(789) printf("size:",len(s)) while len(s) > 0: print(s[-1]) s.pop(-1) 2. Queue 1) C++ // C++ queue q; q.push(123); q.push(456); q.push(789); printf("size: %d\n", q.size());..
https://leetcode.com/problems/product-of-array-except-self/ Product of Array Except Self - LeetCode Product of Array Except Self - Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. leetcode.com idea => prefix, postfix를 이용하..
https://leetcode.com/problems/merge-two-sorted-lists/description/ Merge Two Sorted Lists - LeetCode Merge Two Sorted Lists - You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. leetcode.com 문제자체는 쉽지만 재귀구현이 헷갈렸던문제이다. 그래..
https://leetcode.com/problems/reverse-linked-list/ Reverse Linked List - LeetCode Reverse Linked List - Given the head of a singly linked list, reverse the list, and return the reversed list. Example 1: [https://assets.leetcode.com/uploads/2021/02/19/rev1ex1.jpg] Input: head = [1,2,3,4,5] Output: [5,4,3,2,1] Example 2: [https://asset leetcode.com 미쳤다.재귀를 이문제를 통해 처음으로 완전히 이해했다!!!재귀가 이런거였군...!!! 개..
https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - LeetCode Valid Parentheses - Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: 1. Open brackets must be closed by the same type of brackets. 2. Open brackets must be leetcode.com 이 문제는 괄호의 짝이 맞는 지 확인후 맞다면 True,틀리다면 False를 Return하..
https://leetcode.com/problems/min-stack/ Min Stack - LeetCode Min Stack - Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: * MinStack() initializes the stack object. * void push(int val) pushes the element val onto the stack. * void pop() leetcode.com 이 문제의 핵심은 getMin이다. O(1)의 시간복잡도를 가지면서 Stack에서 최소값을 조회하려면 어떻게 해야할까? ..