Finding the longest palindrome in a string

Implement a function that finds the longest palindrome in a given string. For example, in the string "My dad is a racecar athlete", the longest palindrome is "a racecar a". Count whitespaces as valid characters. Other palindromes in the above...

Read More

Resizing a hash table

Create a hash table with insert(), retrieve(), and remove() methods.

  • Be sure to handle hashing collisions correctly.
  • Set your hash table up to double the storage limit as soon as the total number of items stored is greater than...
Read More

Deep equality of objects in JavaScript

Write a function that, given two objects, returns whether or not the two are deeply equivalent--meaning the structure of the two objects is the same, and so is the structure of each of their corresponding descendants. Don't worry about handling...

Read More

Binary Search Tree

Implement a binarySearchTree class with the following properties:

  • A .left property, a binary search tree (BST) where all values are lower than than it the current value.

  • A .right property, a BST where all values are higher than than...

Read More