Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q-시간복잡도,공간복잡도 #17

Open
J-Jaeh opened this issue Apr 5, 2023 · 2 comments
Open

Q-시간복잡도,공간복잡도 #17

J-Jaeh opened this issue Apr 5, 2023 · 2 comments

Comments

@J-Jaeh
Copy link
Member

J-Jaeh commented Apr 5, 2023

알고리즘에서 '시간복잡도'와 '공간복잡도'란 무엇인가? 그리고 이것들은 왜 중요한가?

@J-Jaeh J-Jaeh changed the title Q-시간복잡도,공간복잡 Q-시간복잡도,공간복잡도 Apr 5, 2023
@J-Jaeh
Copy link
Member Author

J-Jaeh commented Apr 5, 2023

시간복잡도

함수의 실행 시간을 표한한것, 주로 점근적 분석을 통해 실행시간을 단순하게 표현하며 이때 점근적 표기법으로 표현

상한선을 가지고 표현해야함 아무리 느려도 ~ 이정도는 넘어서지 않는다가 중요
즉 O(N) <-> 오메가(1)
image
image

image

image

사진출처

@J-Jaeh
Copy link
Member Author

J-Jaeh commented Apr 5, 2023

알고리즘별,시간복잡도

O(1) : 스택에서 푸쉬 팝 같은거
O(lonN) : 이진트리 (로그의 지수가 2)
O(N) : for 완전루프
O(N*longN) : 퀵정렬, 병합정렬, 힙정렬
O(N^2) : 이중for문 , 삽입정렬, 버블정렬, 선택정렬
O(2^n) : 피보나치수

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant