AWS(Amazon Web Service)에 따르면 Middleware란 다음과 같다. : Middleware란 다른 어플리케이션(앱, 응용프로그램)이 서로 의사소통할 수 있게 해주는 소프트웨어다. 이것은 어플리케이션들을 영리하고 효율적으로 연결함으로서 현식적으로 속도를 향상할 수 있다. Middleware는 다양한 기술과 도구, 데이터베이스 간의 다리로서 역할을 해 이들을 하나의 시스템으로 아주 매끄럽게 통합할 수 있다. 이 하나의 시스템은 유저에게 통합된 서비스를 제공할 수 있다. 예를 들어, 윈도우는 프론트엔드 어플리케이션인 윈도운 리눅스 백엔드 서버로부터 데이터를 전송받지만 어플리케이션 사용자는 이를 인지하지 못한다. : Middleware is software that different appl..
TypeError: 'int' object is not subscriptable : Python에서 List가 아닌 int 변수를 slicing(ex. list[0:5]) 하려고 할 때 발생하는 에러다. 경험상 주로 현재 변수의 자료형을 오인해 해당 에러가 발생하곤한다. slicing 하려고 했던 변수와 변수의 type을 출력해보면 무엇이 잘못됐는지 쉽게 찾을 수 있다.
String과 words List가 input으로 주어지고, 주어진 words List의 substring이 s에 존재한다면 html의 bold tag()를 앞뒤로 씌워 return 하는 문제다. Input: s = "abcxyz123", words = ["abc","123"] Output: "abcxyz123" Explanation: The two strings of words are substrings of s as following: "abcxyz123". We add before each substring and after each substring. 이 문제 역시 다양한 Data Structure와 Algorithm을 활용해 풀 수 있겠지만, Min Heap을 사용해 풀었다. Min Heap은 ..
Computer Science를 공부한 사람이라면 익숙한 pid(process id)와 ppid(parent process id)의 개념이 담긴 문제다. 해당 문제에서 각 process는 1개의 parent process만을 가질 수 있고 반면에 parent process는 여러 child process를 가질 수 있다. 해당 문제의 예시 그림으론 Tree 형태로 제시가 됐고, kill을 하기 위한 pid가 input으로 주어지고, 해당 process를 비롯해 연쇄적으로 모든 child process를 kill을 하기 위해 필요한 모든 pid를 List의 형태로 반환하는 문제다. Input: pid = [1,3,10,5], ppid = [3,0,5,3], kill = 5 Output: [5,10] Exp..
아래와 같이 문자 다음 숫자로 이루어진 일종의 encoded string이 주어지고, 이에 따라 next()와 hasNext() 함수를 구현하는 문제다. next()와 hasNext() 함수를 구현하는 문제는 많이 출제되는 유형 중 하나다. Input: ["StringIterator", "next", "next", "next", "next", "next", "next", "hasNext", "next", "hasNext"] [["L1e2t1C1o1d1e1"], [], [], [], [], [], [], [], [], []] Output: [null, "L", "e", "e", "t", "C", "o", true, "d", true] class StringIterator: def __init__(self,..
같은 message가 10초 안에 다시 Print 되지 않도록 확인하는 함수를 만들면 된다. 파이썬의 해시맵을 사용해 해당 message의 timestamp를 확인하고 갱신해 True/False를 반환한다. class Logger: def __init__(self): self.d = defaultdict(int) def shouldPrintMessage(self, timestamp: int, message: str) -> bool: if message not in self.d: self.d[message] = timestamp return True else: if timestamp - self.d[message] < 10: return False else: self.d[message] = timestam..
A quadratic function(2차 함수)에 계수로 a와 b가 주어지고 y절편(y-intercept)으로 c가 주어지고, 정렬된 리스트(nums)가 주어진다. 이때 input에 따른 2차 함수의 output으로 이뤄진 리스트를 정렬해 반환해야된다. 이때 시간복잡도는 O(n)을 만족해야한다. 예시: Input: nums = [-4,-2,2,4], a = 1, b = 3, c = 5 Output: [3,9,15,33] 시간복잡도를 고려하지 않으면 간단한 정렬 알고리즘을 통해 O(n logn)의 시간복잡도로 정답을 얻을 수 있지만. O(n)의 시간복잡도를 만족하려면 주어진 리스트(nums)가 정렬됐다는 것과 2차 함수의 특징을 이용하면 된다. 2차 함수는 꼭지점을 중심으로 꼭지점으로부터의 x의 거리가 ..
Transaction에 정의는 위키피디아에 따르면 아래와 같다. :In computer science, transaction processing is information processing that is divided into individual, indivisible operations called transactions. Each transaction must succeed or fail as a complete unit; it can never be only partially complete. : 컴퓨터 과학에서 Transaction 처리는 더이상 분리되지 않는 연산 정보 처리를 말한다. 각 Transaction은 처리를 완전히 성공하거나 실패해야한다. 즉, 부분적은 처리는 허락되지 않는다. Da..

Normalization(정규화)란? : In data processing, normalization is the process of transforming and scaling numerical data to bring it to a common range or scale, without distorting the differences in the ranges of the individual values. The main goal of normalization is to reduce or eliminate the effects of different measurement scales, so that different variables can be compared on an equal footing. :..
이진 트리(binary tree)가 주어지고, 이진 트리의 노드(node)에서 각 노드의 val의 값이 1씩 증가하는 child로만 연결이 가능하고 가장 긴 path의 길이를 반환하면 된다. 재귀(Recursive)를 활용한 DFS(Depth First Search)로 풀었다. class Solution { private int M; public Solution() { M = 0; } private void dfs(TreeNode n, int cnt) { TreeNode l = n.left; TreeNode r = n.right; if (l != null) { if (n.val - l.val == -1) { dfs(l, cnt+1); } else { dfs(l, 1); } } if (r != null) ..
- Total
- Today
- Yesterday
- defaultdict
- 티스토리챌린지
- join
- C++
- machine learning
- DICTIONARY
- ml
- Python
- 딕셔너리
- Android
- 안드로이드
- The Economist
- 리트코드
- 이코노미스트 에스프레소
- min heap
- socket programming
- 이코노미스트
- Computer Graphics
- leetcode
- java
- 투 포인터
- 머신 러닝
- I2C
- 소켓 프로그래밍
- Hash Map
- 파이썬
- vertex shader
- tf-idf
- 오블완
- The Economist Espresso
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |