Available question text
Partition an integer array into the minimum number of contiguous subarrays such that each subarray's GCD is greater than 1 (i.e., all elements in a segment share a common prime factor), or report it's impossible. The core challenge is efficiently identifying valid segments (where running GCD stays >1) and using DP/graph/greedy techniques to compute the minimal cuts under typical large-array constraints.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2436. Minimum Split Into Subarrays With GCD Greater Than One
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source