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.
I would take the entire grid as N since this is really our N size with regards to Big O. You're mixing up the convinience of using nxn to get the entire set rather than the saying the semantic (and more redundant) difference in wording of "take a square of 9 bocks, where the left is three and the right is three" as an example. The entire block is the data that you have to work with, which is n. Whatever number of times you need to traverse all of the items in n, you would then multiply by n to get nxn.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Castle on the Grid
You are viewing a single comment's thread. Return to all comments →
I would take the entire grid as N since this is really our N size with regards to Big O. You're mixing up the convinience of using nxn to get the entire set rather than the saying the semantic (and more redundant) difference in wording of "take a square of 9 bocks, where the left is three and the right is three" as an example. The entire block is the data that you have to work with, which is n. Whatever number of times you need to traverse all of the items in n, you would then multiply by n to get nxn.