: A binary decision is a choice between two alternatives, for instance between taking some specific action or not taking it. : 두 개의 대안 중 한 가지를 고른다는 것으로, 예로 예/아니오(Yes/No)나 먹는다/안먹는다(Eat/Don't eat)과 같은 특정 행동을 취하거나 취하지 않는 것을 들 수 있다. 참고 - https://en.wikipedia.org/wiki/Binary_decision

Heapify :Heapify is the process of creating a heap data structure from a binary tree represented using an array. : Heapify란 배열(Array)로 표현된 이진 트리(Binary tree)의 자료구조를 갖는 힙(Heap)을 생성하는 과정이다. 알고리즘 과제로 Heap을 Build하는 문제에 대해 알고리즘을 제시해야했고, 목표 시간복잡도(Time-Complexity)는 Linear time(O(n))이었다. Heap을 접할 때 기본적으로 함께 알게 되는 함수 중 하나가 Insert() 함수다. Insert() 함수의 시간복잡도는 Tree의 Height(높이)만큼 비교가 필요해 O(log n)이다. 이를 n개의 노드..
MST를 알아보기에 앞서 Spanning Tree에 대해 알아보자. Wikipedia에 따르면 Spanning Tree에 대한 정의는 아래와 같다. In the mathematical field of graph theory, a spanning tree T of an undirected graph G is a subgraph that is a tree which includes all of the vertices of G. In general, a graph may have several spanning trees, but a graph that is not connected will not contain a spanning tree (see spanning forests below). If all of..
In computer programming, boilerplate code, or simply boilerplate, are sections of code that are repeated in multiple places with little to no variation. When using languages that are considered verbose, the programmer must write a lot of boilerplate code to accomplish only minor functionality. : 컴퓨터 프로그래밍에서 boilerplate code(boilerplate, 상용구 코드)는 여러번 반복되지만 수정이 거의 없거나 아예 없는 코드를 말한다. 장황하다고 생각되는 언어를..
매번 파이썬 2차원 배열 선언이 헷갈린다. 2차원 배열 선언은 아래와 같고, Shallow Copy(얕은 복사)를 주의해야한다. 우선 Shallow Copy를 고려하지 않은 일반적인 2차원 배열은 아래와 같이 선언한다. Array = [[0 for column in range(9)] for row in range(9)] 혹은 아래와 같이 선언할 수 도 있다. Array = [[0] * 9] for row in range(9)] 다음은 Shallow Copy를 적용한 2차원 배열 선언이다. Array = [[0] * 9 * 9] 위와 같이 2차원 배열을 선언할 경우, [0] * 9라는 배열을 그대로 복사해 생성하는 것으로 Array[0][0]의 값을 변경할 경우 Array[1][0]부터 Array[8][0..
한 블로그에 따르면 Higher order function에 대한 설명은 아래와 같다. A higher order function is a function that takes a function as an argument, or returns a function. Higher order function is in contrast to first order functions, which don't take a function as an argument or return a function as output. : 고차 함수는 인자로 함수를 가지거나 함수를 반환하는 함수이다. 고차 함수의 반대는 first order functions으로 함수를 인자로 가지거나 함수를 반환하지 않는다. Java의 관점에서 Hi..
LeetCode 문제 풀이 중 문자열로 구성된 배열(List)에서 꺼낸 문자열이 숫자인지 여부를 판별하기 위해 고민하던 중 찾아봤다. 1. 아스키 코드(ASCII) : 가장 떠오른 방법이다. 이 방법은 0부터 9까지, 즉 한 자리 숫자만 판별이 가능하다는 한계가 있다. 숫자를 따옴표 안에 넣어 직관적으로 조건문을 선언해도 되고 각각 숫자 0과 9의 아스키 코드 값인 48과 57로 선언해도 된다. 아래는 임의의 문자열 변수(string)를 통한 예다. if "0"
파이썬 코드를 작성하던 중 아래와 같은 에러가 발생했다. : TypeError: 'int' object is not subscriptable 위 에러는 배열에 존재하지 하지 않는 구역에 접근하려고 할 때 발생하며, 예시는 아래와같다. arr = [1, 2, [3, 4]] print(arr[0][1]) 실행 결과: TypeError Traceback (most recent call last) in 1 arr = [1, 2, [3, 4]] ----> 2 print(arr[0][1]) TypeError: 'int' object is not subscriptable * subscript: 아래에 기입한, 아래와 적은 문자[숫자, 기호] 참고 - https://en.dict.naver.com/#/entry/enk..
난이도는 Easy로 아래와 같다. Design a logger system that receives a stream of messages along with their timestamps. Each unique message should only be printed at most every 10 seconds (i.e. a message printed at timestamp t will prevent other identical messages from being printed until timestamp t + 10). All messages will come in chronological order. Several messages may arrive at the same timestamp. Imple..
- Total
- Today
- Yesterday
- 이코노미스트
- 투 포인터
- machine learning
- Python
- Android
- leetcode
- The Economist Espresso
- join
- socket programming
- C++
- I2C
- 오블완
- ml
- 머신 러닝
- 이코노미스트 에스프레소
- Computer Graphics
- vertex shader
- 티스토리챌린지
- 파이썬
- min heap
- 안드로이드
- tf-idf
- java
- 소켓 프로그래밍
- The Economist
- Hash Map
- DICTIONARY
- 리트코드
- 딕셔너리
- defaultdict
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |