Coding: Array length n. Integer k. Find the minimum sub-array length (no elements can be skipped) for which the sub-array has at least k distinct elements. If no such sub-array exists return -1. Implement naively. What is the complexity. Implement efficiently
Check out your Company Bowl for anonymous work chats.