โ† Zomato questions

Sum of series of sums in O(1) time

Filed under Zomato

The question

Compute the sum of the series 1 + (1 + 2) + (1 + 2 + 3) + ... + (1 + 2 + ... + n) in O(1) time complexity.

No write-up yet. Related questions below have one.

Related Zomato questions

Collected from public candidate posts and coding forums. Updated Nov 2026.