A binary search tree is a tree where all of the sibling nodes to the left of a parent node have a value less than the value of the parent node and all of the sibling nodes to the right of a parent node have a value greater than or…

Caesar Cipher is a type of encryption where you take letters in the alphabet and shift them a certain number of positions. If we have a string “abc” and we wanted to encrypt it by shifting each letter 5 positions, the new string would be “fgh.” For example, five positions…

Object Oriented Programming is a programming paradigm that is built upon classes and objects. In essence, it groups together data and functions that are related to one another. This allows for programs to be broken down into simple reusable components.

Classes and Objects

The two major concepts of Object Oriented Programming are classes…

The knapsack problem provides us with an array of items. Each item has a weight and a value. We are also given a knapsack capacity which is the maximum weight that the knapsack can hold. …

The contains duplicate problem provides us with an array of elements. We then have to determine if there are any duplicate elements in the array. In this article we will cover three different approaches with varying Big O time complexities.

Naive/Brute Force

First off there is the naive or brute force approach…

The Merge Intervals problem provides us with an array of intervals. The intervals are given as arrays of two elements where the first element is beginning value of the interval and the second element is the end value. We then have to combine the intervals which have overlapping values.

Here…

A simple way to search for an element in an array is to traverse each element in the array until you find the target element. This can done by using a basic for loop to iterate through the array. While this approach is easy to implement it might not be…

A short and easy way to remove duplicates from array is to use Set. Set is an object in JavaScript that allows you to store unique values. Essentially it iterates through the original values and uses an equality check to remove the duplicates.

The first step would be to convert…

Some of the most basic and vital components of what makes a computer work are the processor, memory and I/O devices. Different setups and structures of these components can allow for greater efficiency or specialization for specific tasks.

Processor

The main component of a computer is the processor. Also referred to…

Modern programming languages seem to allow for endless possibilities. Not only can people create web applications in code that resembles the human language but they also have the ability to perform high speed, complex algorithms and data analysis which has become a normal part of our everyday lives. The programming…

Keith Williams

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store