Monthly Archives: November 2016

  1. Validate Binary Search Tree

    Leave a comment

    November 30, 2016 by oneOokay

    Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as …
    Continue reading

  2. Word Search I

    Leave a comment

    November 30, 2016 by oneOokay

    Given a 2D board and a word, find if the word exists in the grid. The word can be constructed …
    Continue reading

  3. Word Search II

    Leave a comment

    November 30, 2016 by oneOokay

    Given a 2D board and a list of words from the dictionary, find all words in the board. Each word …
    Continue reading

  4. Graph Valid Tree

    Leave a comment

    November 30, 2016 by oneOokay

    Given n nodes labeled from 0 to n – 1 and a list of undirected edges (each edge is a …
    Continue reading

  5. Sort Characters By Frequency

    Leave a comment

    November 27, 2016 by oneOokay

    Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: “tree” Output: “eert” …
    Continue reading

  6. Reverse Words in a String I II

    Leave a comment

    November 27, 2016 by oneOokay

    Reverse Words in a String I II Given an input string, reverse the string word by word. A word is …
    Continue reading

  7. Rotate Array

    Leave a comment

    November 27, 2016 by oneOokay

    Rotate an array of n elements to the right by k steps. For example, with n = 7 and k …
    Continue reading