1852. Distinct Numbers in Each Subarray - Solutions and Explanation | Vultr Docs