Author: ACMer
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer …
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) // …