Company: Virtusa..._11oct
Difficulty: medium
Count Wrapped Items Problem Description You are given a string S consisting of lowercase English letters and digits, where the letters represent items and the digits represent packaging lines. You have to count how many items are wrapped by packaging lines, i.e., how many letters have a digit on the left and a digit on the right in the string. Your task is to find and return an integer value representing the number of items wrapped in packaging lines. Input Specification: input1: A string S containing only lowercase English letters and digits (0-9). Output Specification: Return an integer value representing the number of items wrapped in packaging lines. Examples Example 1: Input: input1 = "1a2b3c4d5" Output: 4 Explanation: Here, the string S is "1a2b3c4d5". We can find the wrapped items as below: 'a' between 1 and 2 'b' between 2 and 3 'c' between 3 and 4 'd' between 4 and 5 The count of such items is 4, hence 4 is returned as the output. Example 2: Input: input1 = "5aart6i7io8o5o56"