0 votes 0 votes Jhunjhunuwala asked Apr 10, 2016 Jhunjhunuwala 595 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes Just output $\frac{n.(n+1)}{2}$. Non-deterministic algorithm includes deterministic ones too. Arjun answered Apr 10, 2016 Arjun comment Share Follow See all 0 reply Please log in or register to add a comment.