employer cover photo
employer logo
employer logo

Dynamic Solution Innovators

Engaged Employer

Dynamic Solution Innovators Interview Question

You are given a number n, write a function (in java programming language) that return sum of 1 no n, i.e. 1+2+3+...+n = ?

Interview Answer

Anonymous

Jan 22, 2020

return n*(n+1)/2;

7