การเรียกซ้ำ: ฟังก์ชันภายในตัวมันเอง

การเรียกซ้ำเป็นวิธีการแก้ปัญหาโดยให้ฟังก์ชันแบ่งงานที่ยากออกเป็นชิ้นเล็กๆ ที่มีรูปร่างเหมือนกัน เพื่อหลีกเลี่ยงการวนซ้ำไม่สิ้นสุด การเรียกซ้ำจำเป็นต้องมีสองส่วนเสมอ: กรณีพื้นฐาน (เมื่อใดควรหยุด) และขั้นตอนการเรียกซ้ำ (เคลื่อนไปสู่เป้าหมายนั้น)

Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.