Category: math
We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write a …
Given a two-dimensional matrix of integers matrix, determine whether it’s a Toeplitz matrix. A Toeplitz is one where every diagonal descending from left to right has the same value. …
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. The given integer is guaranteed to fit within the …
On a N * N grid, we place some 1 * 1 * 1 cubes that are axis-aligned with the x, y, and z axes. Each value v = …
Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums. Formally, we can partition the …