본문 바로가기

Stand up lee

검색하기
Stand up lee
프로필사진 tubeeee

  • 분류 전체보기 (12)
    • 개발일기 (8)
    • 자격증 준비 (1)
    • 자료구조&알고리즘 (3)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
Tags
  • expo-cli error
  • MySQL
  • 자료구조
  • Kotlin
  • 데이터 이해
  • ADsP
  • GitHub
  • 선택정렬
  • watchmanresponse
  • h2 error
  • watchman error
  • kotlin checkbox error
  • kotlin recyclerview checkbox error
  • retrofit
  • 쿼리문
  • sockettimeout
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록자료구조 (1)

Stand up lee

선택 정렬

선택 정렬 선택 정렬이란 가장 작은 것을 선택해서 앞으로 보내는 정렬 기법이다. 가장 작은 것을 선택하는 데 N번, 앞으로 보내는 데 N번의 연산으로 O(N²)의 시간 복잡도를 가진다. 2 4 3 1 9 6 7 8 10 5 1 4 3 2 9 6 7 8 10 5 1 2 3 4 9 6 7 8 10 5 1 2 3 4 5 6 7 8 9 10 한번 정렬할 때마다 발견하는 최솟값을 앞으로 보내고, 최솟값을 넣은 index 부터 시작하여 다시 최솟값을 탐색하여 앞으로 보내는 과정을 반복한다. #include #include #define SIZE 1000 int a[SIZE]; void swap(int *a, int *b){ int temp = *a; *a = *b; *b = temp; } int main(){ in..

자료구조&알고리즘 2021. 6. 4. 16:28
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바