Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions 장재우/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
41 changes: 3 additions & 38 deletions 장재우/01_Code/.gitignore → 장재우/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.rsuser
Expand Down Expand Up @@ -29,6 +29,7 @@ x86/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/

Expand Down Expand Up @@ -90,7 +91,6 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
Expand Down Expand Up @@ -294,17 +294,6 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
Expand Down Expand Up @@ -361,9 +350,6 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb

Expand All @@ -374,25 +360,4 @@ MigrationBackup/
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
*.sln.iml
FodyWeavers.xsd
11 changes: 0 additions & 11 deletions 장재우/01_Code/.vs/01_Code/project-colors.json

This file was deleted.

Binary file removed 장재우/01_Code/.vs/01_Code/v17/.suo
Binary file not shown.
Binary file removed 장재우/01_Code/.vs/01_Code/v17/Browse.VC.db
Binary file not shown.
Binary file not shown.
Empty file.
Binary file removed 장재우/01_Code/.vs/01_Code/v17/Browse.VC.opendb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 0 additions & 31 deletions 장재우/01_Code/01_Code.sln

This file was deleted.

12 changes: 0 additions & 12 deletions 장재우/01_Code/01_Code/maincpp.cpp

This file was deleted.

88 changes: 88 additions & 0 deletions 장재우/03_검색.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# 03. 검색

## 1. 검색 알고리즘

1. 검색과 키
1. 검색 알고리즘 : 데이터 집합에서 원하는 값을 가진 요소를 찾아내는 것
2. 키 : 데이터를 식별하기 위해 사용하는 속성 혹은 속성의 집합

2. 배열에서 검색하기
1. 선형 검색
2. 이진 검색
3. 해시법

## 2. 선형 검색

1. 선형 검색 (Linear Search | Sequential Search)
1. 종료 조건
1. 배열의 끝까지 탐색시
2. 원하는 대상을 발견시

2. 무한 루프
1. while (1)
2. for (;;)
3. do {} while(1) // 권장 X ← 무한루프인지 바로 확인 불가

2. 보초법 (Sentinel Method)
1. 종료 조건을 줄여 비욜을 줄이는
2. 배열의 마지막 n + 1에 찾고자 하는 값을 넣음 (보초(sentinel))

⇒ 배열에 key값 무조건 하나 이상 존재

종료 조건 :

1. 원하는 대상을 발견시

종료 이후 :

1. 발견한 대상이 보초인지 확인


## 3. 이진 검색

1. 이진 검색
1. 이미 정렬된 알고리즘에서 사용 가능
2. 탐색 범위를 반으로 줄여 가며 검색

2. 복잡도
1. 복잡도 (Complexity) : 알고리즘의 성능을 평가하는 기준
1. 시간 복잡도 (Time Complexity)
2. 공간 복잡도 (Space Complexity)

2. O(f(n)) + O(g(n) = O(max(f(n), g(n)))
3. 시간 복잡도 대소 비교

1 < logn < n < nlogn < n^2 < n^3 < n^k < 2^n

3. Arrays.binarySearch에 의한 이진 검색
1. java.util.Arrays 에서 라이브러리 메소드로 지원
2. 장점
1. 직접 코딩 X
2. 모든 자료형에 검색 가능
3. 반환 값
1. 성공시 : 일치하는 요소의 임의의 index
2. 실패시 : 삽입 위치 index 반환

4. C++ STL에서의 이진 탐색
1. binary_search : 존재하는지 여부만 0, 1로 반환
2. lower_bound : 해당 키보다 큰거나 같은 값을 가지는 가장 작은 iterator 반환
3. upper_bound: 해당 키보다 큰 값을 가지는 가장 큰 iterator 반환

5. C++에서의 클래식 메서드 (static 메서드)
1. static 키워드를 통해 정적 메서드 구현 가능
2. static int a; // 선언
3. static void func1(void) { };
4. 이때 static 변수는 class 내에서는 선언만 된것으로, 전역 범위에서 정의 및 초기화 해주어야 한다.
5. int className::a = 0; // 정의 및 초기화

6. stl에서의 compare 함수 객체
1. 사용자 지정 타입에 대한 대소 비교시 필요
2. 정렬, 서칭등에서 함수객체로 요구
3. static 클래스와, 내부의 operation()의 오버로딩으로 compare 구현
4. 위와 동일하게 static 이므로 전역 영역에서 선언 및 초기화 필요
5. 함수객체 제작시 (class vs struct) 비교 가능?

7. c++에서의 template
1. 작명 규칙
1. 대문자 하나를 사용 T
2. element → E | key → K | value → V
36 changes: 36 additions & 0 deletions 장재우/04_스택과 큐.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 04. 스택과 큐

## 1. 스택

1. 스택이란?
1. 스택 (Stack) : LIFO(후입선출) : Last In First Out
2. 용어 :
1. push : 스택에 새로운 원소를 넣는 것 (top 위에 추가)
2. pop : 스택에서 원소를 빼내는 것 (top이 나옴)
3. top : 스택에서 가장 상단, push와 pop이 이루어지는 곳
4. bottom : 스택의 밑바닥

2. 스택 만들기
1. 구성 요소
1. 본체 배열 : 데이터를 저장할 배열
2. max : 스택의 용량
3. ptr : 스택 내부의 데이터 수 (스택 포인터)


## 2. 큐

1. 큐란?
1. 큐 (Queue) : FIFO(선입선출) : First In First Out
2. 용어 :
1. enqueue : 데이터를 넣는 작업
2. dequeue : 데이터를 꺼내는 작업
3. front : 꺼내는 쪽
4. rear : 넣는 쪽

2. 배열로 큐 만들기
1. 구성 요소
1. 본체 배열 : 데이터를 저장할 배열
2. max : 큐 용량
3. num : 현재 데이터 수;

3. 링 버퍼로 큐 만들기
3 changes: 3 additions & 0 deletions 장재우/AgorithmStudy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,6 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
*.exe
*.tlog
*.obj
Binary file not shown.
Binary file not shown.
Loading