← Intuit questions

Lexicographically smallest line of tanks maximizing distinct subarrays

Filed under Intuit

Given M types of tanks numbered 1 to M with infinite supplies, form a line of size N tanks such that the count of subarrays with only distinct tank types is maximized, and return the lexicographically…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Intuit questions

Collected from public candidate posts and coding forums. Updated Nov 2026.