Given N dots that form a triangle such that ith line contains i number of dots.
.
. .
. . .
. . . .
Find the minimum hieght H of the triangle that can be formed using these N dots.
10
4
class Solution{
public:
int height(int N){
return (-1 + sqrt(1 + 8*N))/2;
}
};