• 검색

  • 글작성
  • 방명록
  • 환경설정
  • 메뉴 닫기
seo_.
CATEGORY
  • 분류 전체보기 (221)
    • Codeup 기초 (192)
      • C++ (96)
      • Python (96)
    • Algorithm (29)
      • Basic_Algorithm (20)
      • Algorithm_PS (9)
VISITOR 오늘 전체
  • 글쓰기
  • 환경설정
  • 로그인
  • 로그아웃
  • 취소

계수정렬 검색 결과

해당 글 1건
계수정렬(Counting Sort).

//범위조건이 있는 경우에 한해서 굉장히 빠른 알고리즘. //시간복잡도 O(N). //크기를 기준으로 갯수를 세는 것. #include using namespace std; int main() { int count[5] = { 0, }; int array[30] = { 1, 3, 2, 4, 3, 2, 5, 3, 1, 2, 3, 4, 4, 3, 5, 1, 2, 3, 5, 2, 3, 1, 4, 3, 5, 1, 2, 1, 1, 1 }; for (int i = 0; i < 30; i++) { count[array[i] - 1]++; } for (int i = 0; i < 5; i++) { for (int j = 0; j < count[i]; j++) { cout

Algorithm/Basic_Algorithm 2020. 2. 8. 02:34
  • 이전
  • 1
  • 다음

태그

  • 힙정렬
  • 이분매칭
  • codeup
  • 계수정렬
  • DFS
  • CPP
  • 위상정렬
더보기+

VISITOR

오늘
어제
전체
Powered by Privatenote Copyright © seo_. All rights reserved. TistoryWhaleSkin3.2

티스토리툴바