shared_ptr FTW
moved graph problems to proper folder