• Home
  • About
    • Thoughts To Pen photo

      Thoughts To Pen

      My thoughts on Computer Programming || Psychology || Personal Finances || & much more...

    • Learn More
    • Twitter
    • Instagram
    • Github
    • StackOverflow
  • Posts
    • All Posts
    • All Tags
  • Projects
  • Portfolio
  • Resources
  • About

Computer Programming Algorithms

  • Tries (Prefix Trees)

    Discover the Trie, a specialised tree for string operations. Learn how Auto-Complete works and how to search a dictionary of words in O(L) time.

    Read More
  • A* Search Algorithm

    The crown jewel of pathfinding. Learn how A* combines Dijkstra's guaranteed accuracy with a Greedy Best-First Search heuristic to find the shortest path lightning-fast.

    Read More
  • Bit Manipulation

    Zoom down to the 1s and 0s. Master Bitwise AND, OR, XOR, and Shifts to solve problems with brutal efficiency and zero memory overhead.

    Read More
  • Recursion Patterns — Base Cases & Unwinding

    Demystify Recursion. Learn how functions call themselves, how the Call Stack unwinds, and the difference between Head Recursion and Tail Recursion.

    Read More
  • Backtracking

    Learn how to solve Sudoku, N-Queens, and combination puzzles using Backtracking. We cover the core template that solves almost all combinatorial search problems.

    Read More
  • Greedy Algorithms

    Why look at the big picture when you can just make the best immediate choice? Learn when Greedy Algorithms work, and more importantly, when they fail.

    Read More
  • Dynamic Programming — Tabulation

    Master Bottom-Up Dynamic Programming. Learn how to replace recursive Memoization with iterative Tabulation to eliminate StackOverflows and optimise memory.

    Read More
  • Dynamic Programming — Memoization

    Unlock the power of Top-Down Dynamic Programming. Learn how Memoization turns slow $O(2^n)$ recursive algorithms into lightning-fast $O(n)$ solutions.

    Read More
  • Dijkstra's Shortest Path

    Master Dijkstra's algorithm to find the absolute shortest path on weighted graphs. Learn how it combines BFS and a Priority Queue to work its magic.

    Read More
  • Depth-First Search (DFS) & Applications

    Master Depth-First Search for graphs. Learn how to implement DFS recursively and iteratively to detect cycles, find connected components, and solve mazes.

    Read More
  • Graph Representation & BFS

    Enter the world of Graphs. Learn how to represent graphs using Adjacency Lists and Matrices, and master Breadth-First Search (BFS) to find the shortest paths.

    Read More
  • Heaps & Priority Queues

    Master Heaps and Priority Queues. Discover how an array can represent a perfect binary tree, and how to get the maximum or minimum element in O(1) time.

    Read More
  • Binary Search Trees (BST)

    Learn how Binary Search Trees achieve O(log n) lookups by enforcing strict ordering rules. Includes Java implementation of insert, search, and delete operations.

    Read More
  • Binary Trees — Traversals & Operations

    Discover the anatomy of Binary Trees. Learn the four main traversal methods (In-order, Pre-order, Post-order, Level-order) with clear diagrams and Java code.

    Read More
  • Linked Lists — Singly, Doubly & Circular

    Everything you need to know about Linked Lists. Learn how nodes connect via pointers, difference between Singly and Doubly linked lists, and Java implementation.

    Read More
  • Hash Tables & Hashing

    Understand the magic behind O(1) lookups. We explain Hash Tables, Hash Functions, and collision resolution techniques with Java's HashMap.

    Read More
  • Stacks & Queues — Core Operations

    Learn the core concepts of Stacks (LIFO) and Queues (FIFO). Understand their operations, time complexities, and see them implemented in Java using Deque.

    Read More
  • Sliding Window Technique

    Master the Sliding Window technique to solve contiguous sub-array and sub-string problems efficiently. Covers fixed-size and dynamic window patterns with Java examples.

    Read More
  • Two Pointer Technique

    Learn the Two Pointer technique to solve array and string problems efficiently. Covers opposite-direction and same-direction patterns with Java examples.

    Read More
  • Linear Search & Binary Search

    Master the two fundamental search algorithms. From the brute-force scan of Linear Search to the elegant halving strategy of Binary Search, with Java code and traced examples.

    Read More
  • Counting Sort, Radix Sort & Bucket Sort

    Break the O(n log n) barrier with linear-time sorting algorithms. Learn how Counting Sort, Radix Sort, and Bucket Sort work with detailed examples and Java code.

    Read More
  • Quick Sort — The Versatile Performer

    Discover how Quick Sort partitions arrays around a pivot to achieve O(n log n) average performance in-place. Full Java code, traced example, and pivot strategy discussion.

    Read More
  • Merge Sort — Divide and Conquer

    Master Merge Sort with a visual divide-and-conquer walkthrough, complete Java implementation, and a deep dive into why it guarantees O(n log n) performance.

    Read More
  • Selection Sort & Insertion Sort

    Understand Selection Sort and Insertion Sort with intuitive analogies, traced examples, Java code, and a side-by-side comparison of when to use each.

    Read More
  • Bubble Sort — The Simplest Sort

    Learn how Bubble Sort works with a detailed step-by-step walkthrough, Java implementation, and Big-O analysis. The easiest sorting algorithm to understand for beginners.

    Read More
  • Introduction to Algorithms & Big-O Notation

    Learn what algorithms are, why they matter, and how Big-O notation helps us measure their efficiency. Includes easy-to-follow examples, Java code, and a complexity cheat sheet.

    Read More
  • Algorithms & Data Structures — Complete Guide

    A complete, beginner-friendly guide to algorithms and data structures. Learn sorting, searching, trees, graphs, dynamic programming, and more — with Java examples.

    Read More