Design a hit counter which counts the number of hits received in the past 5 minutes. Each function accepts a timestamp parameter (in seconds granularity) and you may assume …
Memorable domain name? Check. Really cool color scheme and navigation? Check. Content that your audience loves? Uh-oh. No worries this is where most website owners go wrong. They slave …
You have a set of tiles, where each tile has one letter tiles printed on it. Return the number of possible non-empty sequences of letters you can make. Example …
Task: Design a Data Structure (Container) that supports O(1) constant time in Adding, Removing and Getting a Random Element with Equal Probability. For example: // RandomDS.add(3) // RandomDS.add(4) // …
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = , …
Given a sorted array A of unique numbers, find the K-th missing number starting from the leftmost number of the array. Example 1: Input: A = , K = …