Problem · Graph
Drawing Edge
Learn this problemProblem statement
Given a number of nodes, how many ways can a graph be drawn?
A network consists of multiple nodes. Each pair of distinct nodes can either be connected by an edge or remain disconnected. A node cannot be connected to itself. Determine the total number of distinct configurations of such a network. Since the result can be very large, return it modulo 10^9 + 7.
Function
drawingEdge(n: int) → intExamples
Example 1
n = 3return = 8For n = 3 nodes, there are 8 possible configurations:
The function should return 8 because there are 8 possible configurations.