Debug.Log

  • 홈
  • 태그
  • 방명록

재귀 1

하노이 타워 문제

하노이 타워 문제너무 유명한 문제이기 때문에 문제는 생략.재귀를 이용할 수 있는지를 알아보는 문제. #include ​ void Move(int id, char from, char to) { printf("[원판%d] %c -> %c\n",id, from, to); } ​ //from에 꽂혀있는 num개의 원판을 by를 거쳐서 to로 이동. void SolveHanoi(int num, char from, char by, char to) { if (num == 1) { Move(1, from, to); return; } ​ SolveHanoi(num - 1, from, to, by); Move(num, from, to); SolveHanoi(num - 1, by, from, to); } ​ int main..

아카이빙 2018.05.29
이전
1
다음
더보기
프로필사진

Debug.Log

  • 분류 전체보기 (102)
    • 아카이빙 (101)
      • BOJ (30)
      • Unity3D (8)
      • C, C++ (11)
      • C# (32)
      • Clean Code (1)

Tag

유니티, sizeof, 동적 프로그래밍, 스타크래프트, node.js, 안드로이드, C#, 정규표현식, BFS, unity3D, 데이터마이닝, 인터페이스, dp, Regex, Python, C++, Android, 알고리즘, C, dynamic programming,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • facebook
  • 디지털미디어랩

티스토리툴바