IBM logoIBM
Coding·60 minMembers

Max Distinct Counts After Splitting Array

Members only

Given an integer array, split it into two non-empty subarrays and maximise `distinct(left) + distinct(right)`. The expected solution updates left/right frequency structures in one pass.

SWE
hashmap
set
array
easy
Frequency
Low
Last asked
2025-07-09
Stage
oa

Log in to continue reading the full content