I recently appeared for the Titan.email Online Assessment. The OA had 3 coding questions, and after checking them later, all three turned out to be exact matches with Codeforces problems.
The overall difficulty was quite high and the test was clearly more competitive-programming oriented than standard easy/medium LeetCode OAs.
We were given an array a and had to compute:
[
\sum_{l=1}^{n}\sum_{r=l}^{n} f(l,r)\cdot(r-l+1)
]
where
[
f(l,r)=a_l\oplus a_{l+1}\oplus\dots\oplus a_r
]
In simple terms, for every subarray:
Codeforces 1879D – Sum of XOR Functions
We were given an array representing the strengths of monsters.
We could choose the starting monster from any position, and we had to find the minimum initial power required to defeat all monsters while satisfying the required power condition at every attack.
One test case I remember was:
[5, 3, 1, 6, 2, 4]Output:
9Codeforces 1901D – Yet Another Monster Fight
The original Codeforces problem also uses the idea of chain lightning, so Titan had essentially used the same problem/theme.
There were multiple test cases.
For each test case, we were given:
n workers[a, b]We had to assign an appropriate value/salary to each worker such that:
a[i] <= salary[i] <= b[i]while staying within the given total budget.
The objective was to maximize the median salary of all workers.
Codeforces 1251D – Salary Changing
The main idea is to binary search on the possible median and check whether it is possible to assign salaries while keeping the total cost within the budget.
| Titan.email OA Question | Exact Match |
|---|---|
| Weird Computation | CF 1879D – Sum of XOR Functions |
| Chain Lightning | CF 1901D – Yet Another Monster Fight |
| Maximum Median / Workers Budget | CF 1251D – Salary Changing |
This was definitely one of the tougher OAs I have given.
All three questions required a non-trivial observation before implementation, and solving them efficiently required familiarity with competitive-programming techniques rather than only standard DSA patterns.
The question set covered:
If you are preparing for Titan.email, I would strongly recommend practicing Codeforces 1600–1900 rated problems, especially problems involving binary search on answer, greedy observations, prefix/suffix techniques and bit manipulation.
If anyone else appeared for the same Titan.email OA, feel free to share your experience or approach in the comments.