CSE 143 Final Project: Hilbert Sort: 3. The Code

Posted in Computer Science

This is the third in a series of three posts detailing the Hilbert Sort problem, its solution, and its implementation. This post deals with the code to solve the Hilbert Sort problem.

Hilbert Sort: Pseudocode

From our prior post, here is the psudocode for our Hilbert Sort function:

define hilbert_sort( unsorted queue, square dimension ):
create southwest queue
create northwest queue
create northeast queue
create southeast queue
for each point:
if in southwest:
create new point using X -> Y, Y -> X
if in northwest …

CSE 143 Final Project: Hilbert Sort: 2. The Solution Algorithm

Posted in Computer Science

This is the second in a series of three posts detailing the Hilbert Sort problem, its solution, and its implementation. This post solves the problem.

Hilbert Sort Problem

In the prior post, we covered the Hilbert Sort problem, but we state it once more succinctly here before detailing a solution to the problem.

The Hilbert Sort problem asks the following: given a set of labeled $$(x,y)$$ points, how can we sort the points according to the order …

CSE 143 Final Project: Hilbert Sort: 1. The Problem

Posted in Computer Science