Maximum number of edges that N | Function to find the maximum number of edges in a N - vertex graph . ; According to the Mantel 's theorem  the maximum number of edges will be  floor of [(n^2)/4] ; Driver code
function solve ( n ) { var ans = ( n * n / 4 ) ; return ans ; } var n = 10 ; document . write ( solve ( n ) ) ;