The Recursive Book of Recursion: Ace the Coding Interview with Python and JavaScript

The Recursive Book of Recursion: Ace the Coding Interview with Python and JavaScript

作者: Sweigart Al
出版社: No Starch Press
出版在: 2022-08-16
ISBN-13: 9781718502024
ISBN-10: 1718502028
裝訂格式: Quality Paper - also called trade paper
總頁數: 328 頁





內容描述


An accessible yet rigorous crash course on recursive programming using Python and JavaScript examples. Recursion, and recursive algorithms, have a reputation for being intimidating. They're seen as an advanced computer science topic often brought up in coding interviews. Moreover, coders often perceive the use of a recursive algorithm as a sophisticated solution that only true programmers can produce. But there's nothing magical about recursion. Its fearsome reputation is more a product of poor teaching than of the complexity of recursion itself. This book teaches the basics of recursion, exposes the ways it's often poorly taught, and clarifies the fundamental principles behind all recursive algorithms. It is project-based, containing complete, runnable programs in both Python and JavaScript, and covers several common recursive algorithms for tasks like calculating factorials, producing numbers in the Fibonacci sequence, tree traversal, maze solving, binary search, quicksort and merge sort, Karatsuba multiplication, permutations and combinations, and solving the eight queens problem. The book also explains tail call optimization and memoization, concepts often employed to produce effective recursive algorithms, and the call stack, which is a critical part of how recursive functions work but is almost never explicitly pointed out in lessons on recursion. The last chapter, on fractals, culminates with examples of the beautiful fractal shapes recursion can produce.


作者介紹


Al Sweigart is a software developer and tech book author living in Houston. Python is his favorite programming language, and he is the developer of several open source modules for it. His other books are freely available under a Creative Commons license on his website at https: //www.inventwithpython.com/.




相關書籍

深度學習基礎教程

作者 阿努拉格·巴德瓦杰 楊偉 李征等

2022-08-16

Learning R (Paperback)

作者 Richard Cotton

2022-08-16

Machine Learning Python: 2 Manuscripts - Artificial Intelligence Python and Reinforcement Learning with Python

作者 Anthony Williams

2022-08-16