Barnes-Hut
Barnes-Hut algorithm in C++ in real-time with a graphical interface
The Barnes-Hut algorithm solves N-body problems with a $\mathcal{O}(N\log N)$ complexity. It fits the system into a hierarchical structure (octree) which is leveraged to perform adaptive mean-field approximations of the influence of other bodies on each body. You may find my implementation of the algorithm on GitHub.