일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- JS
- 추상적 자료형
- 코테준비
- 노트북램교체
- LinkedList
- solved.ac
- 시간복잡도
- 긱바
- 자바스크립트
- 기계식키보드
- 오늘도코드잇
- 코드잇TIL
- unityC#
- 몬스긱
- JavaScript
- GMK67
- 연결리스트
- ADT
- 코드잇
- 노트북SSD교체
- Unity
- 코테
- 자료구조
- 삼성노트북
- YAML
- 백준
- M1W
- 코딩공부
- 브론즈
- 삼성노트북하판
- Today
- Total
목록Computer Programming (14)
SKYLIGHT STUDIO
버블 정렬에 대해 정렬한다. 아마도... O(n²) 시간복잡도를 가지는 정렬들 중에서는 제일 유명하다고 생각. 일단 그냥 텍스트로 설명하자면, 1번째와 2번째 원소를 비교하여 정렬하고(그러니까 둘을 비교해서 순서를 정리한다는 말이다), 2번째와 3번째, 그리고 N-1번째와 N번째를 정렬한 뒤 처음으로 돌아가서 n-2번째와 n-1번째까지 해서... 최대 n(n-1)/2번 정렬하는 알고리즘. 당연하게도 일반적으로 최악의 성능을 자랑하지만, 그만큼 구현 난이도는 쉽다. 전형적인 코테용 알고리즘이라고 보면 된다. 누가 대체 데이터량의 제곱을 처리하는 알고리즘을 쓰겠어... void bubbleSort(int arr[], int n) { bool swapped; // 교환시 실제로 진행되었는지 확인하는 플래그 f..
계산 복잡도 이론(Computational complexity theory)에서 문제를 해결하려는 데에 걸리는 시간과 입력의 함수 관계를 시간 복잡도라고 통칭한다. 당연하게도 퓨어한 수학에 가까운 개념이므로 잘 이해가 가지 않는 것은 당연하다. 따라서 우리의 주 관점인 컴퓨터사이언스적인 관점에서 알고리즘의 시간복잡도는 입력을 나타내는 문자열의 길이의 함수로서 작동하는 알고리즘을 취해 시간을 정량화하는 것이다. 컴공이나 소프트웨어쪽으로 가면 어차피 죽어라 해야 한다. 더 풀어서 설명하자면, 알고리즘에서 시간 복잡도는 주어진 문제를 해결하기 위한 연산 횟수인 것이다. 실제 시간 복잡도를 정의할 때는 한 가지만 사용하지는 않으며(일반적으로 빅-오(O(n))을 대학 공부할 때 많이 쓰기는 한다) 3가지 유형을 ..
오늘 학습할 내용은 레지스터. 어셈블리어를 처음 학습하는 학부생들에게 결투신청을 하는 처음의 난관이다. 대다수의 어셈블리어 입문서적들은 이렇게들 말한다. "IA-32 레지스터는 범용 레지스터가 8개 있으며, 각 역할은 다음과 같다. EAX는 정수 연산, ECX는 카운팅..." 물론 무식하게 외우면 좋겠지만, 한번 이렇게들 생각해보면 이해하기 쉬울 지도 모르겠다. 레지스터는 변수다. 물론 컴퓨터수학적인 개념으로 변수(Variable)를 생각하면 당연히 와닿지는 않을 것이다. 개념 자체가 아예 다르기도 하고. '리버스 엔지니어링 바이블(강병탁 저)'에서 이 '레지스터=변수' 야매(?) 이론을 이렇게 설명한다. 변수는 변수인데, CPU가 사용하는 변수. 다만 CPU가 사용하는 변수라 개수가 몇 개 안되고, 그..
어셈블리? 어셈블리어가 무엇일까? 일단 어셈블Assemble의 의미부터 한번 알아보자. 파파고의 정의에 따라 키워드를 정의해보면 대강 집합, 회합, 조립으로 정의해볼 수 있겠다. 그렇게 와닿지는 않는... 이제 어셈블리어의 정의를 살펴보자. 영문 위키피디아에 따르면 어셈블리어는 다음과 같다고 할 수 있다. 컴퓨터 프로그래밍에서 어셈블리어는 종종 단순히 어셈블리라고도 하며 일반적으로 ASM 또는 asm으로 약칭되는 어셈블리어는 언어의 명령과 아키텍처의 기계어 코드 명령 사이에 매우 강력한 대응성을 가진 저수준 프로그래밍 언어입니다. 어셈블리어는 일반적으로 기계어 명령 하나당 하나의 문이 있지만 상수, 주석, 어셈블러 지시문...메모리 위치, 레지스터, 매크로도 일반적으로 지원됩니다. 풀이해보자면 어셈블리어..