Interacting Particle Systems: fast algorithms for classical and quantum N-body problems and non-convex optimization