Unequal Elements
Asked at Snowflake · Coding Questions · Difficulty: Medium
A test needs to be prepared on the HackerRank platform with questions from different sets of skills to assess candidates. Given an array, `skills`, of size `n`, where `skills[i]` denotes the skill type of the ith question, select skills for the questions on the test. The skills should be grouped together as much as possible. The goal is to find the maximum length of a subsequence of `skills` such that there are no more than `k` unequal adjacent elements in the subsequence. Formally, find a subsequence of `skills`, call it `x`, of length `m` such that there are at most `k` indices where `x[i] !
Loading the problem…
More Snowflake interview questions
- Design a Distributed Job Scheduler with Cron, Pause, Resume
- Design an ACL Authorization Service
- Design an S3-Style Blob Store with Deduplication
- SQL: Project Duration & Budget per Employee
- Cross-Platform Client Logging Library
- Design a Quota System