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 the time complexity of calculating U and V is O(n), then the time complexity for calculating 1 dimension is O(n^2) which means the time complexity on the whole is O(dn^2). Your editorial seems to be incorrect.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Challenge
You are viewing a single comment's thread. Return to all comments →
If the time complexity of calculating U and V is O(n), then the time complexity for calculating 1 dimension is O(n^2) which means the time complexity on the whole is O(dn^2). Your editorial seems to be incorrect.