Archive: 2014.

How to Force Installation of Vagrant Plugins.

Vagrant is an amazing tool for local development, especially in the case of distributed teams. It allows for complete parity between every team member’s development environment without forcing anyone to follow a complicated list of environment setup steps. Vagrant’s plugin support is also excellent, as it provides for further automating...

PHP Binary Search Tree Implementation.

A Binary Search Tree is an ordered binary tree that has the following rules: The left subtree always contains nodes that have a value less than the current node. The right subtree always contains nodes that have a value greater than the current node. Each subtree must also be binary...

PHP Queue and Stack Implementations.

Continuing on my job interview study session binge, the next two data structures I have built using PHP are the traditional queue and stack. In computer science, stacks and queues typically go hand in hand, however they are opposite implementations of each other. A queue is a first-in-first-out data structure....

Quickly Determine If Two Strings Are Anagrams in PHP.

When interviewing with tech companies, there are a LOT of questions involving anagrams. While there are many different approaches to solving these questions, here is a simple one-line function that can determine whether or not two strings are anagrams in PHP. This approach utilizes the built-in PHP function, count_chars(). When...

A Linked List Implementation in PHP.

For the past few weeks, I have been going through the process of applying and interviewing with some amazing companies, the most exciting of which has been Facebook. Interviewing with Facebook has been an incredible experience which has challenged my knowledge of software development and computer science in so many...