You are given two axis-aligned rectangles represented by two lists, rec1 and rec2. Each list contains four integers: [x1, y1, x2, y2], where (x1, y1) represents the bottom-left corner and (x2, y2) represents the top-right corner of the rectangle. You need to determine if the two rectangles overlap. Two rectangles overlap if their intersection area is positive. Rectangles that only touch at the edges or corners do not count as overlapping.
In a special square room with mirrors on all four walls, except for the southwest corner, there are receptors at three other corners, numbered 0, 1, and 2. A laser ray is fired from the southwest corner and hits the east wall at a certain distance from the 0th receptor. Given the side length of the square room, p, and the distance q from the 0th receptor on the east wall where the laser ray meets, return the number of the receptor the ray hits first after bouncing around the room.
You are given a set of points in a 2D plane, represented by an array where each point is a pair of integers [xi, yi]. Your task is to find the minimum area of a rectangle that can be formed using these points, with sides parallel to the X and Y axes. If no such rectangle can be formed, return 0.
You are given a set of points in a 2D plane, represented as an array where each point is in the format [xi, yi]. Your task is to find the minimum possible area of any rectangle formed by these points, where the sides of the rectangle do not need to be parallel to the X or Y axes. If no rectangle can be formed, return 0. Answers within 10^-5 of the actual area are considered correct.
Given an array of points on a 2D plane, find the k closest points to the origin (0, 0) based on Euclidean distance. If multiple points have the same distance, any order is acceptable.