All Posts

Leetcode 1625: Lexicographically Smallest String After Applying Operations

Given a string s of even length consisting of digits from 0 to 9, and two integers a and b, return the lexicographically smallest string that can be obtained by applying two operations any number of times: adding a to all odd indices of s (with wrapping) and rotating s to the right by b positions.

Leetcode 1638: Count Substrings That Differ by One Character

Given two strings s and t, count the number of ways to choose a non-empty substring of s and replace exactly one character such that the resulting substring becomes a substring of t. In other words, find how many substrings in s differ from substrings in t by exactly one character.

Leetcode 1647: Minimum Deletions to Make Character Frequencies Unique

Given a string s, determine the minimum number of deletions needed to make s ‘good’. A string is ‘good’ if no two characters have the same frequency.

Leetcode 1653: Minimum Deletions to Make String Balanced

You are given a string s consisting of the characters ‘a’ and ‘b’. The goal is to delete the minimum number of characters from s to make it balanced. A string is balanced if no ‘b’ precedes an ‘a’.

Leetcode 1657: Determine if Two Strings Are Close

Two strings are considered transformable into each other if you can convert one into the other by performing a series of operations. These operations include swapping any two characters or transforming all occurrences of one character into another.

Leetcode 1662: Check If Two String Arrays are Equivalent

You are given two string arrays word1 and word2. Return true if these two arrays represent the same string when their elements are concatenated in order, otherwise return false.