All Posts

Leetcode 2249: Count Lattice Points Inside a Circle

You are given a 2D integer array circles, where each element circles[i] = [xi, yi, ri] represents a circle with center at (xi, yi) and radius ri. The task is to find the number of lattice points that lie inside at least one of the given circles. A lattice point is defined as a point with integer coordinates, and points lying on the circumference of a circle are also considered inside.

Leetcode 2266: Count Number of Texts

Alice is texting Bob using her phone’s keypad. Each digit from ‘2’ to ‘9’ maps to multiple letters, and Alice has to press a key several times to type each letter. However, due to a transmission error, Bob receives a string of digits corresponding to the number of key presses rather than the message itself. Your task is to determine how many possible messages Alice could have sent, given the sequence of digits Bob received. The answer should be returned modulo 1e9 + 7.

Leetcode 2269: Find the K-Beauty of a Number

The k-beauty of a number is defined as the number of contiguous substrings of length k that are divisors of the original number when it is read as a string. Your task is to determine the k-beauty of a given number num.

Leetcode 2280: Minimum Lines to Represent a Line Chart

You are given a list of stock prices where each element represents the stock price on a specific day. The stock prices are given as pairs where the first element is the day number and the second element is the stock price for that day. A line chart can be drawn by plotting these prices on an XY-plane, where the X-axis represents the day and the Y-axis represents the price. Your task is to determine the minimum number of lines required to represent the stock prices as a continuous line chart.

Leetcode 2317: Maximum XOR After Operations

You are given an integer array nums. In each operation, select a non-negative integer x and an index i, then update nums[i] to be equal to nums[i] AND (nums[i] XOR x). The task is to find the maximum possible bitwise XOR of all elements after applying the operation any number of times.

Leetcode 2348: Number of Zero-Filled Subarrays

You are given an integer array nums. Your task is to determine the total number of subarrays that consist entirely of zeroes.