A Software Engineering Space

Back To Basics: Returning multiple variables from functions

How can i…. An interesting issue many new programmers come up against when first getting their feet wet is the scenario of implementing a function that either MUST return multiple variables, or would greatly benefit from doing so. Though their are many ways to accomplish this, some better than others none of them are very […]

Extensible Sorting with Custom Comparators

Extensible Sorting You may have encountered this situation before: You have a collection of objects that need sorting, but you want to be able to sort the objects differently depending upon which value or values you use to sort them. In this situation operator overloading is the wrong the tool for the job. What we […]

Binary Search Trees, Part 2: Find Min, Find Max, and Deletion.

Binary Search Trees Part 2 In Part One of this series, i covered Insertion, Searching, and Traversal of Binary Search Trees. No that we can create and add to a tree, as well as display its contents and retrieve contents, It’s time to implement three more fundamental functions of a BST: Find the minimum value, find […]

Simple Binary Tree Visualization

Visualizing Trees If you’ve ever implemented a tree based data structure, chances are when it came time to display the tree, you were left scratching your head. Sure, different tree traversal algorithms allow us to print the contents in different orders, but what about an aesthetically pleasing visualization of the tree structure its self? It […]

The Hungry Programmers Problem: Adventures in Concurrency

Algorithmic Problems The practice of generalizing issues in algorithmic design as “problems” predates the invention of computers. One such example is “The hamiltonian circuits problem” in graph theory which is a generalization of the “traveling salesman problem”. Using the depth first search technique to solve a maze is another. In 1965 Edsgar W. Dijkstra, of […]

xorshift Pseudo Random Number Generators

Defining Randomness When most people say a “Random number” what they really mean is “ANY number”. Randomness has precise mathematical definition, and without getting too deeply into it, it means a number that does not derive from a repeating sequence which can be derived mathematically. The topic only gets deeper from there, branching into statistical […]