UBER Hiring | Priority Queue Based Scheduling & Workforce Cost Optimization | SWE OA(2021)

Uber · Question · Posted Jun 2026

Q1. Adjacent Conflict-Free Character Arrangement Problem Statement A messaging platform wants to rearrange the characters of a string such that no two adjacent characters are identical. Given a string s, rearrange its characters and return any valid arrangement. If no valid arrangement exists, return an empty string. Example 1 Input s = "aab" Output "aba"  Example 2 Input s = "aaab" Output "" Explanation For: aaab Character 'a' appears too frequently, making it impossible to separate all occurrences. Therefore no ...

The full answer & interview discussion are available to premium members.

Log in Create a free account