Answer is [[n(n+1)] / 2 ] + 1 right ??? empty string is also a substring right ???
https://gateoverflow.in/1660/gate1998_1-23
Yes it is right
64.3k questions
77.9k answers
244k comments
80.0k users