Month: March 2020
Insert Delete GetRandom O(1) – Duplicates allowed
Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. insert(val): Inserts an item val to...
[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...