Company: Wells_Frago_10_jan
Difficulty: medium
Count Journey Segments Problem Description Given a customer journey log represented by lowercase letters within the ASCII range 'a'-'z', determine the number of contiguous segments that consist solely of key onboarding steps, where each step appears at least once. The key steps are ['a', 'e', 'i', 'o', 'u'] corresponding to account creation, email verification, identity confirmation, onboarding completion, and initial usage. A segment is defined as a contiguous sequence of characters within the log. Example For journeyLog = "aeioaxaeiuo" There is a segment to the left consisting only of step codes, 'aeioa' which is followed by an 'x' . Since 'x' is not a key step code, it cannot be included in the segment, and this segment does not contain all of the key steps. It is not a qualifying segment. Moving to the right, there are two segments that do qualify: 'aeiuo' and 'aeio' . Function Description Complete the function countJourneySegments in the editor. It has the following parameter(s):