Author: ACMer
Quicksort is the de-factor sorting algorithm that is widely used. Its average runtime complexity is O(nlogn) and it’s usually implemented in either recursion or iterative style. Quicksort can be …
Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all …
A while ago, I was applying a job (Principal Software Engineer) for Microsoft, in Cambridge the Microsoft Research Center. Principle Software Engineer level in Microsoft is a very decent, …
A string S represents a list of words. Each letter in the word has 1 or more options. If there is one option, the letter is represented as is. …
Given an array A of positive integers, let S be the sum of the digits of the minimal element of A. Return 0 if S is odd, otherwise return …