GeeksforGeeks » Interview Questions

Google interview question

(4 posts)
  • Started 2 months ago by gautam5669
  • Latest reply from gautam5669

Tags:

  1. Kumar
    Member
    Posted 2 months ago #

    Given 2n points on a circle.find the number of ways to draw n non intersecting chords.

  2. Shekhu
    Member
    Posted 2 months ago #

    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.

  3. ishan
    Member
    Posted 2 months ago #

    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 .

  4. Kumar
    Member
    Posted 2 months ago #

    @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.

RSS feed for this topic