Pages

Computer science, programming and code examples, blog posts, and small projects.

My Founder's Journey

9 Product Hunt Submissions, a couple dozen domain names registered, dreams to last for years, and other notables from my journey as a solo-preneur.

View

Complete Binary Search Tree Code Implementation in JavaScript

Binary Trees are common data structures used in computer science specifically for programs geared toward high efficiency searching and output.

View

Check if Binary Search Tree Structure is Valid

Binary search trees allow for efficient functionality but only when their nodes follow the rules. Here's how to check if a binary search tree is valid.

View

Hash Table JavaScript Implementation with Linear Probing

Probing allows hash tables to have dynamic sizes which greatly influence memory and time efficiency. Here's how you can build the functionality in JavaScript.

View

Building a Binary Max Heap in JavaScript

Binary max heaps allow for efficient data insertion and max value extraction and are used for the efficient heap sort algorithm.

View

Binary Max Heap Sort Algorithm in JavaScript

The heap sort algorithm is one of the most efficient ways to sort values in computer science. This post includes a concise JavaScript implementation of the algorithm.

View

Binary Search Algorithm with Arrays in JavaScript

The binary search algorithm is one of the most efficient ways to find an element in an already-sorted set of data. We can implement binary search with a simple array data structure in JavaScript.

View

Storing Big Data With Distributed Hash Tables Simulation

Hash tables provide a great data structure method for storing large quantities of data because, on average, they provide constant time search access to the data.

View

Creating a Constant-Time JavaScript Stack

You can create a stack object in JavaScript that will enable you to maintain your data in constant time including pushing, popping and getting the maximum value.

View

Network Packet Processing Simulation in JavaScript

This is a simulation of a network packet processor actively receiving new packets, placing incoming packets in queues and processing them according to size and memory constraints.

View

Maximum Value in JavaScript Sliding Window Queue

We can create an object in JavaScript to behave like a stack and a queue to help us with the sliding window, constant-time conundrum.

View

Using Priority Queues to Simulate Parallel Processing

We can use binary heaps to create efficient priority queues. In this code example, we simulate a scheduler program that sends jobs to multiple processors based on priority.

View

Check balance of brackets in code

Code examples for validating string balance particularly when it comes to opening and closing brackets.

View

Tree Data Structures in JavaScript & PHP

See how to create, add to trees, remove from trees, traverse trees and more in these JavaScript and PHP coding examples.

View

Replicating a Dynamic Array in JavaScript

Although arrays in JavaScript size-up automatically, we can create a stack object to replicate the process of creating a dynamically allocated array.

View

Linked List Data Structure Implementation

Linked Lists are a computer science data structure that uses pointers to connect nodes located at different points in memory. Here we implement linked lists in JavaScript.

View

Merge Sort Algorithm Implementation in JavaScript

The merge sort algorithm works by dividing larger data sets into small ones - think divide and conquer - before rebuilding the dataset in the sorted order.

View

Radix Sort Algorithm Implementation in JavaScript

The Radix Sorting Algorithm is an interesting program that puts integers in order by breaking up integers into their individual places - think 1s place, 10s place, 100s place and so on in decimal.

View

Selection Sort Algorithm Implementation in JavaScript

The Selection Sort algorithm sorts a dataset by finding the smallest value and moving it to the left of the data structure. When it locates the smallest number from the remainder of the unsorted dataset, it'll swap it with the value that currently resides in the left-most opening.

View

Shell Sort Algorithm Implementation in JavaScript

Shell sort is an in-place comparison sort. It can be seen as either a generalization of sorting by exchange (bubble sort) or sorting by insertion (insertion sort).

View

Bubble Sort Algorithm Implementation in JavaScript

Bubble Sort is a simple linear algorithm that loops through a dataset comparing elements that are side-by-side and swapping their order if the next value is smaller than the current one.

View

Insertion Sort Algorithm Implementation in JavaScript

The Insertion Sorting algorithm is a program that runs one loop through a dataset and upon coming to a value, it checks for values in the dataset prior to the current value that are larger than the current value. Then, if there are larger values, it moves the current value forward to its ordered place and shifts all other values back.

View

Quick Sort Algorithm Implementation in JavaScript

The Quick Sort algorithm is similar to Merge Sort in that it divides the dataset into smaller, more manageable datasets and sorts them before combining and returning.

View

Find Inorder Successor in Binary Search Tree

Binary search trees aren't a linear data structure, but here's how you can return the next value in the data set just like you can with arrays and linked lists but more efficiently.

View

Sorting Algorithm Animations

Animations and code examples for popular sorting algorithms.

View

Computer Science Flashcards

Hundreds of flashcards that I've put together to help with the transformation from self-taught coder to computer scientist.

View

Depth-First Traversal Orders in Binary Trees

Unlike common data structures such as arrays, stacks and linked lists, tree data structures can be traversed and values returned in multiple ways. Here are a few depth-first traversal orders.

View

Using Rabin-Karp's Algorithm to Find All Occurrences of Substring

Rabin-Karp's Substring Algorithm allows us to find occurrences of substrings in text using hashing. Here is an implementation of the algorithm in JavaScript.

View

Storing Phone Numbers with Direct Address Hashing

Direct addressing is method of storing values in a variable that allow for constant time addition, deletion and value returning. Here's a JavaScript implementation.

View

Tweet me @tylerewillis

Or send me an email: