3438. Find Valid Pair of Adjacent Digits in String
You are given a string
sconsisting only of digits. A valid pair is defined as two adjacent digits inssuch that:
- The first digit is not equal to the second.
- Each digit in the pair appears in
sexactly as many times as its numeric value.Return the first valid pair found in the string
swhen traversing from left to right. If no valid pair exists, return an empty string.
1 | package main |