Daniel Ray's Blog

Daniel Ray's Blog

I like computer science and programming. I hope you enjoy my blog.

23 Jul 2020

The Stable Marriage Problem

The stable marriage problem can be stated as follows: Given (a) two sets that have the same number of elements and (b) a...
21 Jul 2020

The Sieve of Eratosthenes

Given an integer N > 1, you want to find all of the prime numbers from 1 to N. For example, if N = 11, then you get {2, ...
21 Jul 2020

Marbles in Three Baskets and Problem Theory

Marbles in Three Baskets is an ACM-ICPC problem. My solution to it is up at my GitHub. Here are my thoughts on the probl...
18 Jul 2020

Monty Hall meets Monte Carlo

You are on a game show. You can pick between three doors (A, B, and C). One of the doors has a prize behind it. Each of ...
18 Jul 2020

Adjacency Lists

If you aren't familiar with graph theory, I advise you to read my post on minimum spanning trees, where I define several...