<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Programming Logic on Software Engineering Learning Paths</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/</link><description>Recent content in Programming Logic on Software Engineering Learning Paths</description><generator>Hugo</generator><language>en</language><atom:link href="https://kyngo.github.io/learning-paths/paths/programming-logic/index.xml" rel="self" type="application/rss+xml"/><item><title>Variables, Data Types, and Memory</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/01-variables-types-memory/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/01-variables-types-memory/</guid><description>&lt;h2 id="what-is-a-variable"&gt;What is a Variable?&lt;a class="anchor" href="#what-is-a-variable"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A variable is a named reference to a location in memory where a value is stored. The name is for humans; the computer only cares about the memory address.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Declaration: int age = 25;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;What happens:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;1. Compiler allocates 4 bytes (for int) at address 0x7FFF001A
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;2. Stores the value 25 in those bytes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;3. Associates the name &amp;#34;age&amp;#34; with address 0x7FFF001A&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="variable-lifecycle"&gt;Variable Lifecycle&lt;a class="anchor" href="#variable-lifecycle"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class="mermaid"&gt;flowchart LR
 D[&amp;#34;Declaration&amp;lt;br/&amp;gt;(allocate space)&amp;#34;] --&amp;gt; I[&amp;#34;Initialization&amp;lt;br/&amp;gt;(assign first value)&amp;#34;]
 I --&amp;gt; U[&amp;#34;Usage&amp;lt;br/&amp;gt;(read/write)&amp;#34;]
 U --&amp;gt; F[&amp;#34;Destruction&amp;lt;br/&amp;gt;(free memory)&amp;#34;]&lt;/pre&gt;&lt;p&gt;In most languages, destruction is automatic — either when the variable goes out of scope (stack) or when the garbage collector reclaims it (heap).&lt;/p&gt;</description></item><item><title>Control Flow</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/02-control-flow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/02-control-flow/</guid><description>&lt;p&gt;Control flow determines the execution order of statements. Without it, programs would be strictly sequential — no decisions, no repetition, no branching.&lt;/p&gt;
&lt;h2 id="the-three-fundamental-structures"&gt;The Three Fundamental Structures&lt;a class="anchor" href="#the-three-fundamental-structures"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every algorithm can be expressed using only three structures (Böhm-Jacopini theorem):&lt;/p&gt;
&lt;pre class="mermaid"&gt;flowchart LR
 subgraph Sequence
 A1[&amp;#34;Statement A&amp;#34;] --&amp;gt; B1[&amp;#34;Statement B&amp;#34;] --&amp;gt; C1[&amp;#34;Statement C&amp;#34;]
 end
 
 subgraph Selection
 D1{&amp;#34;Condition?&amp;#34;} --&amp;gt;|True| E1[&amp;#34;Path A&amp;#34;]
 D1 --&amp;gt;|False| F1[&amp;#34;Path B&amp;#34;]
 end
 
 subgraph Iteration
 G1{&amp;#34;Condition?&amp;#34;} --&amp;gt;|True| H1[&amp;#34;Body&amp;#34;]
 H1 --&amp;gt; G1
 G1 --&amp;gt;|False| I1[&amp;#34;Exit&amp;#34;]
 end&lt;/pre&gt;&lt;hr&gt;
&lt;h2 id="conditionals-selection"&gt;Conditionals (Selection)&lt;a class="anchor" href="#conditionals-selection"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="ifelse"&gt;If/Else&lt;a class="anchor" href="#ifelse"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The most basic decision structure:&lt;/p&gt;</description></item><item><title>Functions, Scope, and Recursion</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/03-functions-scope-recursion/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/03-functions-scope-recursion/</guid><description>&lt;h2 id="functions"&gt;Functions&lt;a class="anchor" href="#functions"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A function encapsulates a unit of work — it takes inputs, performs computation, and produces output. Functions are the primary tool for managing complexity in software.&lt;/p&gt;
&lt;h3 id="anatomy-of-a-function"&gt;Anatomy of a Function&lt;a class="anchor" href="#anatomy-of-a-function"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;calculate_shipping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;distance_km&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;express&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; Calculate shipping cost based on weight, distance, and speed.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; Args:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; weight_kg: Package weight in kilograms
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; distance_km: Shipping distance in kilometers
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; express: Whether to use express delivery
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; Returns:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; Shipping cost in euros
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;base_rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;2.50&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;weight_rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.75&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;distance_rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;distance_km&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;cost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;base_rate&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;weight_rate&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;distance_rate&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;express&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;cost&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Components:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Data Structures</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/04-data-structures/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/04-data-structures/</guid><description>&lt;p&gt;Data structures organize data for efficient access and modification. The right structure can make the difference between an algorithm that runs in milliseconds and one that takes hours.&lt;/p&gt;
&lt;h2 id="choosing-a-data-structure"&gt;Choosing a Data Structure&lt;a class="anchor" href="#choosing-a-data-structure"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class="mermaid"&gt;flowchart TD
 A[&amp;#34;What operations do you need?&amp;#34;] --&amp;gt; B{&amp;#34;Ordered access?&amp;#34;}
 B --&amp;gt;|&amp;#34;By index&amp;#34;| C[&amp;#34;Array / ArrayList&amp;#34;]
 B --&amp;gt;|&amp;#34;By key&amp;#34;| D[&amp;#34;Hash Map&amp;#34;]
 B --&amp;gt;|&amp;#34;Sorted order&amp;#34;| E[&amp;#34;Tree / Sorted Set&amp;#34;]
 B --&amp;gt;|&amp;#34;No&amp;#34;| F{&amp;#34;Access pattern?&amp;#34;}
 F --&amp;gt;|&amp;#34;FIFO&amp;#34;| G[&amp;#34;Queue&amp;#34;]
 F --&amp;gt;|&amp;#34;LIFO&amp;#34;| H[&amp;#34;Stack&amp;#34;]
 F --&amp;gt;|&amp;#34;Priority&amp;#34;| I[&amp;#34;Heap / Priority Queue&amp;#34;]
 F --&amp;gt;|&amp;#34;Unique elements&amp;#34;| J[&amp;#34;Set&amp;#34;]
 F --&amp;gt;|&amp;#34;Relationships&amp;#34;| K[&amp;#34;Graph&amp;#34;]&lt;/pre&gt;&lt;hr&gt;
&lt;h2 id="arrays-and-dynamic-arrays"&gt;Arrays and Dynamic Arrays&lt;a class="anchor" href="#arrays-and-dynamic-arrays"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="static-arrays"&gt;Static Arrays&lt;a class="anchor" href="#static-arrays"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Fixed-size, contiguous memory block. The most fundamental data structure.&lt;/p&gt;</description></item><item><title>Algorithms</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/05-algorithms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/05-algorithms/</guid><description>&lt;p&gt;An algorithm is a finite, well-defined sequence of steps that solves a problem. This section covers the essential algorithms every programmer should know — sorting, searching, and graph traversal — with implementations and analysis.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="sorting-algorithms"&gt;Sorting Algorithms&lt;a class="anchor" href="#sorting-algorithms"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="why-sorting-matters"&gt;Why Sorting Matters&lt;a class="anchor" href="#why-sorting-matters"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Sorting is a prerequisite for many other algorithms (binary search, merge operations, duplicate detection). Understanding sorting algorithms teaches fundamental algorithmic techniques: divide-and-conquer, incremental construction, and heap properties.&lt;/p&gt;
&lt;h3 id="bubble-sort--the-teaching-algorithm"&gt;Bubble Sort — The Teaching Algorithm&lt;a class="anchor" href="#bubble-sort--the-teaching-algorithm"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Repeatedly swap adjacent elements if they&amp;rsquo;re in the wrong order:&lt;/p&gt;</description></item><item><title>Big-O Notation and Complexity Analysis</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/06-big-o-complexity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/06-big-o-complexity/</guid><description>&lt;h2 id="what-big-o-measures"&gt;What Big-O Measures&lt;a class="anchor" href="#what-big-o-measures"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Big-O notation describes how an algorithm&amp;rsquo;s resource usage (time or space) &lt;strong&gt;scales&lt;/strong&gt; as input size grows. It captures the &lt;strong&gt;upper bound&lt;/strong&gt; of growth rate, ignoring constants and lower-order terms.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;O(n) means: &amp;#34;grows linearly with input size&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;O(n²) means: &amp;#34;grows quadratically with input size&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;O(1) means: &amp;#34;constant — doesn&amp;#39;t grow with input size&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="why-constants-dont-matter"&gt;Why Constants Don&amp;rsquo;t Matter&lt;a class="anchor" href="#why-constants-dont-matter"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Both are O(n) — the constant factor (3 vs 1) is irrelevant at scale&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;triple_loop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="c1"&gt;# 3n operations&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;single_loop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="c1"&gt;# n operations&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;pass&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At n = 1,000,000: 3n = 3,000,000 vs n = 1,000,000. Both are &amp;ldquo;millions.&amp;rdquo;
But O(n) vs O(n²): n = 1,000,000 vs n² = 1,000,000,000,000. That&amp;rsquo;s the difference that matters.&lt;/p&gt;</description></item><item><title>Computational Thinking and Problem Decomposition</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/07-computational-thinking/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/07-computational-thinking/</guid><description>&lt;p&gt;Computational thinking is the process of formulating problems so they can be solved systematically. It&amp;rsquo;s not about computers — it&amp;rsquo;s about structured problem-solving that happens to be executable by machines.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-four-pillars"&gt;The Four Pillars&lt;a class="anchor" href="#the-four-pillars"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class="mermaid"&gt;flowchart TD
 CT[&amp;#34;Computational Thinking&amp;#34;] --&amp;gt; D[&amp;#34;Decomposition&amp;#34;]
 CT --&amp;gt; PR[&amp;#34;Pattern Recognition&amp;#34;]
 CT --&amp;gt; AB[&amp;#34;Abstraction&amp;#34;]
 CT --&amp;gt; AL[&amp;#34;Algorithm Design&amp;#34;]
 
 D --&amp;gt; D1[&amp;#34;Break into manageable sub-problems&amp;#34;]
 PR --&amp;gt; PR1[&amp;#34;Find similarities across problems&amp;#34;]
 AB --&amp;gt; AB1[&amp;#34;Remove irrelevant detail&amp;#34;]
 AL --&amp;gt; AL1[&amp;#34;Define step-by-step solutions&amp;#34;]&lt;/pre&gt;&lt;hr&gt;
&lt;h2 id="decomposition"&gt;Decomposition&lt;a class="anchor" href="#decomposition"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="breaking-problems-down"&gt;Breaking Problems Down&lt;a class="anchor" href="#breaking-problems-down"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Every complex system is made of simpler parts. Decomposition is identifying those parts and their relationships.&lt;/p&gt;</description></item><item><title>Recursion Deep Dive</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/08-recursion/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/08-recursion/</guid><description>&lt;p&gt;Recursion is a strategy where a function solves a problem by reducing it to smaller instances of the same problem. Section 03 introduced the concept — this section explores recursive thinking in depth, visualises the call stack, and tackles classic recursive problems.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="recursive-thinking"&gt;Recursive Thinking&lt;a class="anchor" href="#recursive-thinking"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every recursive solution requires two components:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Component&lt;/th&gt;
					&lt;th&gt;Purpose&lt;/th&gt;
					&lt;th&gt;Example (factorial)&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Base case&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Stops recursion, returns a known value&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;factorial(0) = 1&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Recursive case&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Reduces the problem toward the base case&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;factorial(n) = n × factorial(n-1)&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="the-reduction-pattern"&gt;The Reduction Pattern&lt;a class="anchor" href="#the-reduction-pattern"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Recursive thinking means asking: &lt;em&gt;&amp;ldquo;If I already had the answer for a smaller input, how would I build the answer for the current input?&amp;rdquo;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Graph Algorithms</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/09-graph-algorithms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/09-graph-algorithms/</guid><description>&lt;p&gt;Graphs model relationships between entities — social networks, road maps, dependency chains, web links. This section covers graph representations, traversal algorithms, shortest paths, and topological ordering.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="graph-fundamentals"&gt;Graph Fundamentals&lt;a class="anchor" href="#graph-fundamentals"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A graph &lt;strong&gt;G = (V, E)&lt;/strong&gt; consists of vertices (nodes) and edges (connections between nodes).&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Property&lt;/th&gt;
					&lt;th&gt;Directed&lt;/th&gt;
					&lt;th&gt;Undirected&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Edge meaning&lt;/td&gt;
					&lt;td&gt;A → B (one-way)&lt;/td&gt;
					&lt;td&gt;A — B (both ways)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Example&lt;/td&gt;
					&lt;td&gt;Web links, task dependencies&lt;/td&gt;
					&lt;td&gt;Friendships, roads&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Edge count (complete)&lt;/td&gt;
					&lt;td&gt;V × (V-1)&lt;/td&gt;
					&lt;td&gt;V × (V-1) / 2&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Term&lt;/th&gt;
					&lt;th&gt;Definition&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Degree&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Number of edges connected to a vertex&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Path&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Sequence of vertices connected by edges&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Cycle&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Path that starts and ends at the same vertex&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Connected&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Path exists between every pair of vertices&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Weighted&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Edges carry a numeric cost/distance&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;DAG&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;Directed Acyclic Graph — directed, no cycles&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2 id="graph-representations"&gt;Graph Representations&lt;a class="anchor" href="#graph-representations"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="adjacency-matrix"&gt;Adjacency Matrix&lt;a class="anchor" href="#adjacency-matrix"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A 2D array where &lt;code&gt;matrix[i][j] = 1&lt;/code&gt; (or the weight) if an edge exists from vertex i to vertex j.&lt;/p&gt;</description></item><item><title>Dynamic Programming</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/10-dynamic-programming/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/10-dynamic-programming/</guid><description>&lt;p&gt;Dynamic programming (DP) is an optimisation technique that solves complex problems by breaking them into overlapping subproblems, solving each subproblem once, and storing the result. It transforms exponential brute-force solutions into polynomial ones.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="when-does-dp-apply"&gt;When Does DP Apply?&lt;a class="anchor" href="#when-does-dp-apply"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A problem is suitable for dynamic programming when it exhibits &lt;strong&gt;both&lt;/strong&gt; properties:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Property&lt;/th&gt;
					&lt;th&gt;Definition&lt;/th&gt;
					&lt;th&gt;Test&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Overlapping subproblems&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;The same smaller problems are solved repeatedly&lt;/td&gt;
					&lt;td&gt;Draw the recursion tree — do you see repeated nodes?&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;strong&gt;Optimal substructure&lt;/strong&gt;&lt;/td&gt;
					&lt;td&gt;The optimal solution contains optimal solutions to subproblems&lt;/td&gt;
					&lt;td&gt;Can you express the answer in terms of answers to smaller inputs?&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;pre class="mermaid"&gt;flowchart TD
 A[&amp;#34;Problem has optimal substructure?&amp;#34;] --&amp;gt;|No| B[&amp;#34;DP won&amp;#39;t help&amp;#34;]
 A --&amp;gt;|Yes| C[&amp;#34;Subproblems overlap?&amp;#34;]
 C --&amp;gt;|No| D[&amp;#34;Use Divide &amp;amp; Conquer (no caching needed)&amp;#34;]
 C --&amp;gt;|Yes| E[&amp;#34;Use Dynamic Programming&amp;#34;]
 E --&amp;gt; F[&amp;#34;Top-down (memoisation)&amp;#34;]
 E --&amp;gt; G[&amp;#34;Bottom-up (tabulation)&amp;#34;]&lt;/pre&gt;&lt;hr&gt;
&lt;h2 id="memoisation-vs-tabulation"&gt;Memoisation vs Tabulation&lt;a class="anchor" href="#memoisation-vs-tabulation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="top-down-memoisation"&gt;Top-Down (Memoisation)&lt;a class="anchor" href="#top-down-memoisation"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Write the natural recursive solution, then cache results to avoid recomputation.&lt;/p&gt;</description></item><item><title>Complexity Analysis In Depth</title><link>https://kyngo.github.io/learning-paths/paths/programming-logic/11-complexity-analysis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kyngo.github.io/learning-paths/paths/programming-logic/11-complexity-analysis/</guid><description>&lt;p&gt;Section 06 introduced Big-O notation and common complexity classes. This section goes deeper — covering formal analysis techniques, space complexity, amortised analysis, and practical measurement. The goal is to move from &amp;ldquo;memorising complexities&amp;rdquo; to &amp;ldquo;deriving them yourself.&amp;rdquo;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="big-o-the-formal-definition"&gt;Big-O: The Formal Definition&lt;a class="anchor" href="#big-o-the-formal-definition"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;O(f(n))&lt;/strong&gt; describes an upper bound on growth rate:&lt;/p&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;T(n) is O(f(n)) if there exist constants c &amp;gt; 0 and n₀ ≥ 0 such that T(n) ≤ c·f(n) for all n ≥ n₀.&lt;/p&gt;</description></item></channel></rss>