Added solve function and changed time function to use solve instead of traversal

Erik 2,5h