shlogg · Early preview
Md Ariful Haque @mah-shamim

Make String A Subsequence Using Cyclic Increments

Two pointers i and j are used to check if str2 is a subsequence of str1 with at most one cyclic increment operation. If characters match or can be incremented cyclically, both pointers move forward.

2825. Make String a Subsequence Using Cyclic Increments
Difficulty: Medium
Topics: Two Pointers, String
You are given two 0-indexed strings str1 and str2.
In an operation, you select a set of indices in str1, and for each index i in the set, increment str1[i] to the next character cyclically. That is 'a' becomes 'b', 'b' becomes 'c', and so on, and 'z' becomes 'a'.
Return true if it is possible to make str2 a subsequence of str1 by performing the operation at most once, and false otherwise.
Note: A subsequence of a string is a new string that is formed from the original string by deleting some...