Skip to content
Open
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
8 changes: 7 additions & 1 deletion homework4.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
1. What is .gitignore? You can write the answer either in Korean or English.
2. Why do Github users need an SSH key pair? (Users can use either SSH key pair or github account info.) Please write down a brief explanation of SSH key.

파일을 하나하나씩 git repository에 넣지 않고, git add . 을 이용해 변경된 파일 전체를 staging area에 추가하고 commit 하는 경우에 보안상으로 위험성이 있거나/프로젝트와 관계 없거나/용량이 너무 커서 제외하고 싶은 파일들을 .gitignore 이라는 디렉토리에 넣어줌으로써 무시하고 제외시킬 수 있다.

2. Why do Github users need an SSH key pair? (Users can use either SSH key pair or github account info.) Please write down a brief explanation of SSH key.

인증되지 않은 사용자에 의해 github 서버에 존재하는 작업물들이 훼손되고 손실되는 것을 방지하기 위해 SSH key를 필요로 한다. 오로지 SSH key를 통해 인증된 사용자만 push 작업을 할 수 있다. PC에서 github repository에 작업물을 업데이트 할 때 본인이 PC의 주인임을 인증해야 하는데, 이 인증 작업에 사용되는 것이 바로 SSH key 인 것이다.
git bash를 통해 PC에서 SSH key를 생성하고, SSH key 정보를 github에 등록하고 나면 push를 자유롭게 할 수 있다.
Binary file added homework4/2019-13875.zip
Binary file not shown.
15 changes: 11 additions & 4 deletions homework4/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ int main()

int* output = new int[arrsize];
cout << "Array output: ";

/***********************************
Implement the code here!
************************************/
int count = 0;
for (int i = 0; i < arrsize; i++)
{
for (int j = 0; j < arrsize; j++)
{
if (arr[i] > arr[j])
count++;
}
output[i] = count;
count = 0;
}

for (int i = 0; i < arrsize; i++) {
cout << output[i] << " ";
Expand Down