link to problem
https://practice.geeksforgeeks.org/problems/handshakes/0/?track=recursion-interview
how to solve this problem,pls explain,i am not even able to understand the problem
No of handshakes (recursion)
In Problem consider you have n points you have to join them in such a way that no lines cross (intersect each other). you have to tell the number of ways to do so.
Solution: to do this we use a recursive approach, eg: let ith and jth points are connected then, total ways would to connect points will be the sum of ways to connect on left side + right side,
try to understand from this equation:
dp[i]=dp[j]*dp[i-j-2]+dp[i];
we optimize if using DP later.
Note: another solution is using Catalan numbers. this is similar to the above approach.
Do post if you need more explanation and code.