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.
Interview Code Editor
  • Hint 1
  • Solution Approach
  • Complete Solution
1789 successful submissions.
Click here to jump start your coding interview preparation