Showing 3 of 6 questions
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.
#1. Alternating Groups II
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.
#2. Alternating Groups I
Determine if a given 9x9 Sudoku board is valid. Check if each row, column, and 3x3 subgrid contains the digits 1-9 without repetition.
#3. Valid Sudoku