In 2008, Malcolm Gladwell’s book Outliers stated that it takes 10,000 hours of practice to truly master something. That is, however, a ballpark figure and the meaning of the statement has been…

# Category: Programming

## Comparing Two Arrays in Any Order (JavaScript)

How do you tell if two arrays are equal regardless of the order of their values? In doing some programming exercises in preparation for interviews, I ran across a task that required…

## Interview Questions – Algorithms – Pairwise

This series answers coding interview questions from the Coding Interview Prep collection at freeCodeCamp. You can find more with the interview questions tag. Given an array of elements and a number as…

## Interview Questions: The 24 Game – Rosetta Code

The game is to take a string of 4 digits and determine how to make them total up to 24 using plus, minus, times, divide, and parentheses. People play this game sort of like Sudoku as a mental exercise.

## The Coding Interview: Rosetta Code – 100 Doors

In this exercise, we receive an arbitrary # of doors (100 in the title, but not always). We manipulate those doors over and over, then return a result based on the final state after the manipulations.

## The Coding Interview: Updating Inventory

We have two 2-dimensional arrays in the form of `[[count, “product1”], [count, “product2”],…]`. The task is to compare them. Where a product exists in both arrays, add the sum of the two counts and the product name in the final array. If the item is unique to either array, add it to the final array. Return the final array, alphabetically sorted…

## The Coding Interview: Create A Circular Queue

This is a data structure problem. A circular queue allows you to specify a size for easier memory management. It’s initialized with a set number of slots. Each write operation fills a slot, each read operation empties a slot.

## The Coding Interview: Implement a Bubble Sort

This series answers coding interview questions from the Coding Interview Prep collection at freeCodeCamp. You can find more with the interview questions tag. I’ve had 8 different blogs since 1995, two of…

## The Coding Interview: Implement Binary Search

In this implementation of a binary search, you’re presented a sorted array of values and a target value to find within it.

## The Coding Interview: Find the Symmetric Difference

The concept is to find the numbers in two arrays that do not repeat in both. If you’re comparing more than 2 arrays, you compare the next array (and beyond) to the result of the last comparison.

## Alien Shootz – a Space Invaders clone

Here’s another game demo rescued from the old site. I created this using the Phaser JavaScript game library, back in 2018, for the purposes of teaching the kids at Seattle CoderDojo how…