[Programming Problem] Closest Binary Search Tree Value I and II

Closest Binary Search Tree Value Given a non-empty binary search tree and a target value, find the value in the BST that is closest...

[Programming Problem] Daily Temperatures

Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you...

[Programming Problem] Restore IP Addresses

Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example:   Input: "25525511135" Output: ["255.255.11.135", "255.255.111.35"]Example: Input:...

[Programming Problem] N-ary Tree Level Order Traversal

Given an n-ary tree, return the level order traversal of its nodes’ values. [Problem Link] Pretty straightforward BFS traversal logic. Here are some small...

Simplify Path

[Problem Link] Tokenize the string with ‘/’ as a delimiter. Create a graph where nodes have pointers to parent nodes. Keep moving up(& down)...

Integer to English Words

Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 – 1. [Problem Link] Create a...

[Leetcode] Binary Tree Right Side View

[Problem Link] Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see...

[Leetcode] One Edit Distance

[Problem Link] If you’ve solved the edit distance dynamic programming problem, this problem should be straightforward. Make sure to return false if both strings...

[Hackerrank] Pairs

You will be given an array of integers and a target value. Determine the number of pairs of array elements that have a difference...

[Leetcode] Unique Paths II

[Problem Link] Total paths ending at [i, j] are Total paths ending at [i+1, j] + Total paths ending at [i, j+1]Total paths ending...