Implementation and use cases for computer science algorithms

19 21,873 2,034
articles words lines of code

Solving “Bridge Repair”, from day 7 of Advent of Code 2024, in 4ms with Python with a simple deductive algorithm.

This article goes over the content I taught at the world's largest programming lesson that broke a Guinness World Record with 1668 students.

Explore unusual Python features to solve the problem of determining whether an expression is properly parenthesised.

How can you find the longest substring that contains only unique characters?

This tutorial shows how to use a simple genetic algorithm to deduce physics formulas.

How can you find the biggest free square in a 2D map with obstacles?

This article shows how to solve the N queens problem in 20 lines of code.

Today I learned about the piece table data structure.

Today I learned about the Damerau-Levenshtein distance used on strings in the field of genetics.

Today I learned about the skip list data structure.

This article is an in-depth analysis of Python solutions to the “Sonar Sweep” problem, which is day 1 of Advent of Code 2021.

This article will teach you about the minimax algorithm and alpha-beta pruning, from a beginner's perspective.

Today I learned that the .join method in Python is a two-pass algorithm, and that's why joining a list comprehension is faster than a generator expression.

Today I learned about an algorithm that Python uses to sort out inheritance.

Alice and Bob are going to be locked away separately and their faith depends on their guessing random coin tosses!

Can you find out how many carriages this circular train has?

I have always loved solving mazes... so naturally I had to write a program to solve mazes for me!

Can you measure exactly \(2\)L of water with two plain buckets with volumes of \(14\)L and \(5\)L? Of course you can!

Progress is great and new things are always exciting... but that doesn't mean old things don't have any value!