All Posts

Leetcode 2815: Max Pair Sum in an Array

You are given an integer array nums, and you need to find the maximum sum of any two distinct numbers in the array such that the largest digit in both numbers is the same.

Leetcode 2824: Count Pairs Whose Sum is Less than Target

You are given a 0-indexed integer array nums and an integer target. Return the number of distinct pairs (i, j) such that 0 <= i < j < n and nums[i] + nums[j] < target.

Leetcode 2828: Check if a String Is an Acronym of Words

Given an array of strings words and a string s, determine if s is an acronym of words. The string s is considered an acronym of words if it can be formed by concatenating the first character of each string in words in order.

Leetcode 2833: Furthest Point From Origin

You are given a string moves consisting of characters ‘L’, ‘R’, and ‘’. The string represents movements on a number line starting from position 0. You can choose to move left or right when the character is ‘’, and the goal is to calculate the maximum distance from the origin you can reach after completing all the moves.

Leetcode 2839: Check if Strings Can be Made Equal With Operations I

You are given two strings s1 and s2, each consisting of 4 lowercase English letters. You can perform a specific operation multiple times, where you swap two characters at indices i and j such that j - i = 2. The task is to determine if it’s possible to make s1 equal to s2 after performing any number of such operations.

Leetcode 2843: Count Symmetric Integers

You are given two integers low and high. Return the number of symmetric integers in the range [low, high]. A symmetric integer has an even number of digits, and the sum of the first half of its digits equals the sum of the second half. Numbers with an odd number of digits are never symmetric.