강의

멘토링

커뮤니티

Inflearn Community Q&A

777joonho8873's profile image
777joonho8873

asked

Introduction to Algorithm Problem Solving for IT Employment (with C/C++): Coding Test Preparation

40. Intersection (Two-Pointer Algorithm: MS Interview Time Limit 1 Second)

시간복잡도

Resolved

Written on

·

179

0

문제와는 별개로 궁금합니다.

시간복잡도에 대해 잘 몰라서 질문을 드립니다.

a 배열과 b 배열 선택정렬 하는 시간복잡도와

2중 반복문으로 하나씩 비교하는 시간복잡도의 차이는 어느정도 인가요?

a 배열 b배열 선택정렬하는 시간복잡도가 최악의 경우라고 가정했을 때요

C++코테 준비 같이 해요!

Answer 1

0

codingcamp님의 프로필 이미지
codingcamp
Instructor

안녕하세요^^

선택정렬이나 2중 for문이나 둘 다 시간복잡도가 O(n^2)으로 동일합니다.

777joonho8873's profile image
777joonho8873

asked

Ask a question