HF RL Explorer

Task: Generate Permutations Without Adjacent Equal Elements

Task: Generate Permutations Without Adjacent Equal Elements: a task in Terminal-Lego-15k (Harbor dataset). Given a list of elements that may contain duplicates, your task is to implement a solution that generates a permutation of the list such that equal elements are never adjacent (or as seldom…

The task

Given a list of elements that may contain duplicates, your task is to implement a solution that generates a permutation of the list such that equal elements are never adjacent (or as seldom as possible when it's impossible to completely avoid adjacent duplicates).

Part of PrimeIntellect/Terminal-Lego-15k.