We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If you're getting timeout on some cases with the C++ template, try passing the vector > by reference to your DFS function. Otherwise it will copy the vector on each invocation of DFS. This reduces my times from seconds to milliseconds.
Journey to the Moon
You are viewing a single comment's thread. Return to all comments →
If you're getting timeout on some cases with the C++ template, try passing the vector > by reference to your DFS function. Otherwise it will copy the vector on each invocation of DFS. This reduces my times from seconds to milliseconds.