GeeksforGeeks » Interview Questions
Google interview question
(4 posts)-
Given 2n points on a circle.find the number of ways to draw n non intersecting chords.
-
There will be n ways.
Put all chords in vertical manner.. Rotate all chords by one point . Keep rotating. After n rotations, the chords will again become vertical.
-
this can be done like this :
Total number of non intersecting chords(N) = 2n + n + n/2 + n/4 + n/8 ...........+1
Number of ways to draw "n" non intersecting chords = NCn .
-
@shekhu it doesn't work try for n=4 ie with 8 points no of ways will be more than 4 figure out.
@Ishan
eg : for 4 points i.e. n=2
N = 4+2+1=7
no of non intersecting chords with 4 points =7C4 = 35 try (figure)it this is not the rite ans.
Reply
You must log in to post.