<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Recursion on Kelly Dev</title><link>https://kelly-chui.github.io/algorithmtags/recursion/</link><description>Recent content in Recursion on Kelly Dev</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 03 May 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://kelly-chui.github.io/algorithmtags/recursion/index.xml" rel="self" type="application/rss+xml"/><item><title>Programmers. 하노이의 탑</title><link>https://kelly-chui.github.io/ps/2023/ps-programmers-tower-of-hanoi/</link><pubDate>Wed, 03 May 2023 00:00:00 +0000</pubDate><guid>https://kelly-chui.github.io/ps/2023/ps-programmers-tower-of-hanoi/</guid><description>&lt;h2 id="문제"&gt;문제&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://school.programmers.co.kr/learn/courses/30/lessons/12946"&gt;https://school.programmers.co.kr/learn/courses/30/lessons/12946&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="풀이"&gt;풀이&lt;/h2&gt;
&lt;p&gt;이런 문제는 문제를 읽었을 때 어떻게 풀어야 할지 감이 잘 잡히지 않는다. 이러한 상황에서는 우선 문제를 시각화 해보자.&lt;/p&gt;
&lt;img loading="lazy" src="https://kelly-chui.github.io/ps/2023/ps-programmers-tower-of-hanoi/image-002-optimized-image.webp"&gt;&lt;p&gt;좌측은 n = 1일때, 우측은 n = 2일때의 이동을 시각화 한 것이다. 빨간색 숫자는 원판을 뜻하고 파란색 선은 이동루트를 뜻한다. n = 1 일 때는 당연한 이동 경로지만 n = 2일 때는 중간에 있는 기둥을 사용해야한다. 하지만 아직까진 규칙이 뚜렷하게 드러나지 않는다.&lt;/p&gt;
&lt;img loading="lazy" src="https://kelly-chui.github.io/ps/2023/ps-programmers-tower-of-hanoi/image-003-optimized-image.webp"&gt;&lt;p&gt;n = 3 일때의 이동경로를 시각적으로 나타냈다. 사실 직접 손으로 그리지 않고 다른 사람이 그린 그림으로 봤을 땐 아직도 규칙이 아리송 할 수 있지만 손으로 직접 그렸을 땐 규칙을 바로 알아 챌 수 있다.&lt;/p&gt;</description></item></channel></rss>