On an 8 x 8 chessboard, there is one white rook. There also may be empty squares, white bishops, and...
In a town, there are N people labelled from 1 to N. There is a rumor that one of these people is sec...
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. T...
For a non-negative integer X, the array-form of X is an array of its digits in left to right order. ...
We have an array A of integers, and an array queries of queries. For the i-th query val = queries[i]...
Given an integer array nums sorted in non-decreasing order, return an array of the squares of each n...
Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area,...
Given two positive integers x and y, an integer is powerful if it is equal to x^i + y^j for some int...
A binary tree is univalued if every node in the tree has the same value. Return true if and only if ...
In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeate...