# Validate Binary Search Tree in Javascript

In this post I’ll be going over a solution to Leetcode problem 98. Validate Binary Search Tree.

Given the `root` of a binary tree, determine if it is a valid binary search tree (BST).

A valid BST is defined as follows:

# Sorted Array to Binary Search Tree in Javascript

This post will be going over a solution in javascript for Leetcode problem 108. Convert Sorted Array to Binary Search Tree.

In this problem we’re given a sorted array, and with it are asked to build a height-balanced binary search tree.

To start, we need to refresh on some definitions:

# Zigzag Level Order Traversal of a Binary Tree in Javascript (Recursive)

In my last 2 posts I talked about level order traversal, once with a recursive solution and once with an iterative solution. In this post I’ll be covering a very similar problem: Leetcode problem #103 Binary Tree Zigzag Level Order Traversal. …

# Level Order Traversal of Binary Tree in Javascript (Queue)

In my last post I talked about a recursive solution for Leetcode problem 102 Binary Tree Level Order Traversal. Here, I’ll be going through an iterative solution using a queue.

With the recursive solution, we passed a level parameter to our recursive function which we incremented each time we called…

# Level Order Traversal of Binary Tree in Javascript (Recursive)

In this post I’ll be going through one possible implementation of a level order traversal of a binary tree using Leetcode problem 102 Binary Tree Level Order Traversal.

First, what is a level order traversal? A level order traversal is a tree traversal in which you process all nodes of…

# Constructing a Binary Search Tree in Javascript

In this post I’ll be walking through how to construct a basic binary search tree (BST) in javascript. There are many ways to construct a BST and this is just one method.

First, create a node class for the construction of each individual node in the tree. For each node…

# Binary Tree Traversal in JS— Preorder, Postorder and Inorder

Three common ways to traverse a binary tree (which according to Cracking the Coding Interview you should know how to implement prior to your interviews) are preorder, inorder, and postorder traversal.

At a high level the definitions of each of these types of traversal are as follows:

Preorder:

# Remove nth to Last Element in a Linked List (Javascript)

One thing I’ve noticed the more I’ve been doing practice algorithms is the power of pointers. This is especially true in linked list algorithms.

In this post I’ll be sharing a really intuitive approach to a common linked list problem, Remove Nth Node from End of List (this is problem…

# In place reversal in Javascript

There are many different ways to reverse a string. The most obvious is to split the string into an array and use the .reverse() method. A common interview question is to perform simple operations like this on a string without built in methods. Additionally, you’ll often be asked if you…

# AJAX Basics

AJAX is the reason we’re able to use Google Maps instead of Mapquest. It enables a web page to update information immediately based on a user action or request, without having to reload the entire page by sending an HTTP request to the server.

## What is AJAX?

AJAX stands for Asynchronous Javascript and… 