Intersecting Chords in a Circle

Given a number N, return number of ways you can draw N chords in a circle with 2*N points such that no 2 chords intersect.
Two ways are different if there exists a chord which is present in one way and not in other.

For example,

If points are numbered 1 to 4 in clockwise direction, then different ways to draw chords are:
{(1-2), (3-4)} and {(1-4), (2-3)}

So, we return 2.


  • 1 ≤ N ≤ 1000
  • Return answer modulo 109+7.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Intersecting Chords in a Circle on Interview Code Editor
Sign Up
to access hints and editorial solutions for Intersecting Chords in a Circle


Click here to start solving coding interview questions