Fibonacci numbers in C (4 different ways)

Fibonacci series in pure C no talking, using only vim and gcc in terminal, implementing four alternative designs: 1) Recursive: using the typical mathematical definition for Fib(n) 2) Iterative: using loop instead of recursion to avoid call stack overflows 3) Dynamic Programming: using buffer for cached results, calculated only once 4) Analytical: using the solution of the differential equation for Fib(n) Each option has its pros and cons, typically trading code simplicity for resources (recursion) or trading memory (cache) for speed. The purpose of this tutorial is to demonstrate coding discipline when working with very limited coding tools (command-line only in terminal) and alternative designs for use in different situations. Inline comments describe details about the code being written. Enable captions for more information on what is happening in each section of the video.
Enable captions for more details and walk-through. Source code available at the Github repository (see channel info). Tags: #asmr #coding #programming #gcc #vim #notalking #retro #terminal

Comments

Popular Posts

Hello x86: Low-level assembly coding for the 8086

Announcement: Writing a new book in Data Science and R&D projects

Multiplication tables in COBOL

Bricks and towers in Prolog

Channel Updates