Showing 3 of 6 questions
Determine the maximum length of alternating groups (even-odd or odd-even) within a given array. Find the longest sequence where adjacent numbers have different parity.
#1. Alternating Groups I
Determine the length of the longest subsequence within a binary string that consists of alternating groups of 0s and 1s. You are allowed to remove characters to achieve this alternating pattern.
#2. Alternating Groups II
Given a string and two substrings, find the indices where the first substring occurs. Then, find the indices where the second substring occurs. Return the indices of the first substring that are close to any index of the second substring, within a specified range.
#3. Find Beautiful Indices in the Given Array I
Page 1 of 1 · 6 total