Page 4 - Showing 2 of 26 posts
View all posts by years →
- MEX Reordering - Codeforces Solution
Rearrange an array so that no prefix and suffix share the same MEX value. Key insight: analyze occurrences of zero and one.
5 min read en - XOR Convenience - Codeforces Solution
Construct a permutation where each value XORed with a later value equals the index. Core idea: direct all XOR results to the last position.
4 min read en