You are given three stones located at different positions on the X-axis. The positions are represented by three distinct integers a, b, and c. In one move, you can pick a stone from either of the two endpoints (the smallest or the largest position) and move it to any unoccupied position between the two endpoints. The game ends when all three stones are positioned at three consecutive spots on the X-axis. Your task is to determine the minimum and maximum number of moves required to reach this configuration.
There are n passengers boarding an airplane with n seats. The first passenger has lost their ticket and picks a random seat. The remaining passengers sit in their assigned seat if available or pick a random seat if their assigned seat is taken. Return the probability that the nth person gets their own seat.
You are given a wooden plank of length n, and some ants are walking on the plank. Some ants move to the left, others to the right. When two ants meet, they change directions without any additional time loss. When an ant reaches the edge of the plank, it falls off. The task is to determine when the last ant will fall off the plank.
An integer n is considered strictly palindromic if, for every base b between 2 and n - 2 (inclusive), the representation of n in base b is a palindrome. A number is palindromic in a base if the string representation of that number in that base reads the same forward and backward. Your task is to determine if the given integer n is strictly palindromic or not.
Given an integer array nums of size n, find the length of the longest contiguous subarray that has the maximum possible bitwise AND. The bitwise AND of an array is calculated by performing a bitwise AND operation on all the numbers in it.