You are given the coordinates of a square on a chessboard. The coordinate is represented as a string where the first character is a letter representing the column (‘a’ to ‘h’) and the second character is a number representing the row (‘1’ to ‘8’). Determine if the square is white or black. A square is white if the sum of its row and column is even, and black if it is odd.
You are given an array of non-negative integers. A pair of indices (i, j) is nice if nums[i] + rev(nums[j]) equals nums[j] + rev(nums[i]). Return the number of nice pairs modulo 10^9 + 7.
You are given an integer array nums. The task is to compute the product of all the elements in the array and return the sign of the product. Implement the function signFunc(x) that returns 1 if x is positive, -1 if x is negative, and 0 if x is 0. Return signFunc(product) for the array.
In this problem, there are n friends sitting in a circle. The game proceeds by counting k friends clockwise starting from the 1st friend. The last friend counted leaves the circle. This continues until only one friend remains, who is the winner. Your task is to find the winner of the game given n and k.
You are given an array of points, each represented by its coordinates [xi, yi] on a 2D plane. You are also given an array of queries, where each query describes a circle defined by its center at (xj, yj) and its radius rj. For each query, your task is to compute how many points lie inside or on the border of the circle.