목록MJ (709)
MJay
notes-2019-10-07 undirected graph 에서 V1 = V and E
금메달을 찍었다. 왜냐면 다 풀어봤기 때문이다. 이렇게만 나오면 너무 감사하겠다 낼은 transfer 할꺼를 다 해봐야겠다.
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bLnBKe/btqyWmbpd1M/OKsM5SK8binobzkc5BnXU0/img.png)
알고리즘은 책으로 시작하는게 좋아보인다. 일단 책으로 어디까지 했는지 다 정리를 해보는게 좋을꺼 같다. CSE 565 KT 위주로 보면 될꺼같다. 모르는거 위주로 봐야할꺼같다. 2.2 2.4 2.5 4.4 4.5 5.1 5.2 5.3 5.4 5.5 5.6 6.1 6.5 6.6 6.7 6.8 6.10 homework 랑 퀴즈도 해야한다. 책을 먼저 보고 해결을 해보자 2.2 Asymptotic Order of Growth 중요한거랑 모르는거랑만 정리를 해보자면 O, Theta, 하나가 뭐드라 근데 이건 이제 고수다. Pass 2.4 A Survey of Common Running Times Merging Two Sorted Lists O(n log n) Time 이 정도 2.5 A More Complex ..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/A4ggD/btqyU7ThjKD/S4U31mKikHE1CHyKOZbaJk/img.png)
Computer Architecture 퀴즈 준비 RISC에서 문제는 나올꺼같지가 않다. IBM 퀴즈 이것도 나올 문제가 없는거 같은데 Optimum PipeLine 이것도 뭔지 몰겠네 Branch History 만 챙기면 되겠네 Associativy 이거 없애면 더 나으려나 없는게 더 나을꺼같은데 퀴즈는 진짜 건질게 없어보인다.
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/l2XkN/btqyStaZATr/2JiwSREOtnuC5ljUMaqlq0/img.png)
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is guaranteed to have unique values. Example 1: Input: root = [10,5,15,3,7,null,18], L = 7, R = 15 Output: 32 Example 2: Input: root = [10,5,15,3,7,13,18,1,null,6], L = 6, R = 10 Output: 23 Note: The number of nodes in the tree is at most 10000. The fi..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/b22YmO/btqyQLKyymG/dXshKguMbaDyTTThOjxdPK/img.png)
You have some apples, where arr[i] is the weight of the i-th apple. You also have a basket that can carry up to 5000 units of weight. Return the maximum number of apples you can put in the basket. Example 1: Input: arr = [100,200,150,1000] Output: 4 Explanation: All 4 apples can be carried by the basket since their sum of weights is 1450. Example 2: Input: arr = [900,950,800,1000,700,800] Output..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/Ax6rK/btqyStWfq3q/KaRdPRShI9ut3tkyiZ6IN0/img.png)
Computer Architecture 공부 Throughput 이다. PipeLining으로 인해 할수있는 양이 늘어났다. Cache - Temporal, Spatial Locality 2 * 10 ^ 9 을 역수로 하면 된다. G -> 2 ^ 9 이였나. 그냥 외우자 일단 Cache는 보면 physical address 랑 관련있는 듯 Number of sets -> 64kB / 2 * 32 = 2 ^ 10 10 bits 이다. 즉 Index가 10개라는 걸 뜻한다. 2 ^ 5 = 5 bits are block offset -> offset은 아마 set 안에서 몇개의 블락이 있는 거니까 32B Cache -> 2 ^ 5 을 뜻하는 거 같다. Tag Overhead - 17 bits * 2 ^ 10 ..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/XYfrR/btqyPWENT33/1fFMnDkT2jkDzuvgcAael1/img.png)
Algorithm 문제 푸는 중 lines -> points Graham Scan’s Algorithm. Upper envelope lower hull Given Dataset, 이미 convex hull이 존재한다고 했으니, Counter-clock-wised 로 되는 point만 찾으면 된다. next point as the starting point Convex Polygon 에 속하는게 Convex Hull이다.
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/cisIt4/btqyQ51Cfsg/iJMnKN6OF6IzrN85kfnO4k/img.png)
existing VM에 queue가 가는 걸 막아서 안 쓰는 VM을 줄일 수 있다고 한다. 람다를 사용해서 그런 거 같은데 autoscale을 할때 existing VM(used, unused)에 queue 가 가는 걸 줄인다고 했다. Lambda를 추가하므로 cost-saving가 그렇게 차이가 나지는 않는다. 이렇게 하는게 맞다. reactive, predictive에서 어느 쪽이 lambda로 간다고 하면 되려나 intermittent load surge 를 생각해야 한다 Lambda 랑 VM을 쓰는 걸로 하면 된다. Cold Start Problem
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/dtHrF4/btqyPsKHf26/B6PgoGmqvwZA6fSMEBFkoK/img.png)
free resources 가 있으면 VM에 스케줄 한다. 결론은 average request rate에 VM을 쓴다 busy VM을 쓸 경우 다른 VM은 idle이 돼서 terminate 되니까 그래서 terminate가 될 확률이 크다 Simulator 구조 원리 기존 가지고 있는 train model을 쓴다. 20분동안 lambda function을 쓴다 warm start 가 20분 동안이라고 했다. traces를 berkely 뭔지 찾아봐야겠다. 뭐 현실 세계에 맞는 데이터를 사용하려고 글 너 거 같다. load generator가 뭐지 뭐 그런 거지 그냥 assumption이다. 5 번은 하군 그리고 lambda, vm, x-autoscaling peak shaving cost-saving 차..