ProjectsSeptember 29, 2026

Algorithms in Python and Java

Built with
  • Python
Algorithms in Python and Java: illustrated cover

System architecture

Component and data flow diagramWeighted graph to Min-heap: Start node. Min-heap to Stale-entry check: Pop minimum. Stale-entry check to Neighbor traversal: Current entry. Neighbor traversal to Relax edges: Candidate distance. Relax edges to Min-heap: Push improvement. Relax edges to Distance map: Record best.REPRESENTATIVE IMPLEMENTATION / DIJKSTRAStart nodePop minimumCurrent entryCandidate distancePush improvementRecord bestWeighted graphAdjacency listsMin-heapNext shortest distanceStale-entry checkSkip outdated entriesDistance mapShortest known pathsRelax edgesImprove + push to heapNeighbor traversalDistance + edge weight
Swipe horizontally to inspect the diagram.This is an algorithm flow, not a deployed service. The repository also contains topic-based Python exercises, with a separate Java DSA repository.
Knowing a library call is different from understanding the work it performs. These repositories make the data structure, algorithm and reasoning visible, from basic searching to graph paths and dynamic programming. DSA-Python is organized by topic: arrays, graphs, trees, linked lists, stacks, queues, recursion, tries and dynamic programming. The separate DSA repository contains Java exercises, including collections, sorting, linked lists, trees and object-oriented programming examples. This is a collection of independent programs rather than a deployed service. Inputs and example calls live near the implementations, which makes individual techniques easier to study without setting up an application stack. The inspected Python Dijkstra implementation represents a graph with an adjacency dictionary of weighted neighbours. A heap selects the next candidate with the smallest known distance. The algorithm ignores stale heap entries and pushes an updated candidate when a shorter path is found. The same file explores a binary maze using a queue and a minimum-effort grid path using a heap. Seeing these alongside each other highlights that the objective determines the state and update rule: number of steps, sum of weights and maximum edge difference are different problems. Standalone scripts make experiments approachable, but repeated helpers and print-driven examples do not provide a uniform regression suite. Some files contain alternative or unfinished approaches. This collection is presented as engineering practice, not a production algorithm package or a claim of comprehensive test coverage. The next improvement would be parameterized tests for edge cases and explicit algorithm preconditions, including non-negative edge weights for Dijkstra. Packaging reusable structures separately would reduce duplication while preserving the worked examples.

Related projects

Let’s talk about the engineering

I’m open to software engineering roles across backend, platform, and data teams. Get in touch to discuss the architecture, trade-offs, or how this experience could help your team.
Get in touch