All Posts

Leetcode 2178: Maximum Split of Positive Even Integers

Given an integer finalSum, split it into a sum of as many unique positive even integers as possible. If such a split is not possible, return an empty array.

Leetcode 2180: Count Integers With Even Digit Sum

Given a positive integer num, return the number of positive integers less than or equal to num whose digit sum is even.

Leetcode 2217: Find Palindrome With Fixed Length

You are given an array of queries and a positive integer intLength. For each query, you need to find the query-th smallest palindrome of length intLength. A palindrome is a number that reads the same backward and forward, and it cannot have leading zeros. If no such palindrome exists for a query, return -1.

Leetcode 2221: Find Triangular Sum of an Array

You are given a 0-indexed integer array nums, where each element is a digit between 0 and 9. The triangular sum of nums is computed by repeatedly reducing the array by replacing each element with the sum of two consecutive elements, modulo 10. This process continues until only one element remains, which is the triangular sum. Your task is to return the triangular sum of the array.

Leetcode 2235: Add Two Integers

Given two integers, calculate and return their sum.

Leetcode 2240: Number of Ways to Buy Pens and Pencils

You have a certain amount of money and want to buy pens and pencils. Given their costs, determine the number of distinct ways you can buy some combination of pens and pencils, including buying none.