If there are $n$ nodes then
We can connect $node\ 1$ to $n-1$ nodes using $n-1$ direct links
We can connect $node\ 2$ to $n-1$ nodes using $n-2$ direct links ( not $n-1$ since we have already connected it with $node 1$)
We can connect $node\ 3$ to $n-1$ nodes using $n-3$ direct links ( not $n-1$ since we have already connected it with $node\ 1$ and $node\ 2$)
.....
We can connect $node\ n$ to $n-1$ nodes using $0$ direct links (since it is already connected to every other node)
So total number of links required = $(n-1)+(n-2)+(n-3)+....+1+0= \frac{n(n-1)}{2}$
$\therefore$ Option $4.$ is correct.