Search Results for: coding exercise
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 A of 0s and 1s, consider N_i: the i-th subarray from A to A interpreted as a binary number (from most-significant-bit to least-significant-bit.) Return a list …
Given an array A of integers, for each integer A we may choose any x with -K <= x <= K, and add x to A. After this process, …
Given a API guess(int num) which will return three possible results (0 – you guess right, -1 my answer lower, and 1 my answer higher), your task is to …