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 …
Given an array of integers nums, sort the array in ascending order. Example 1: Input: Output: Example 2: Input: Output: Note: 1 <= A.length <= 10000 -50000 <= A …
Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every element of the array should …
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 …