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.
but using this approach you will generate 9! permutation, wich is 362880, isnt this too much ? the complexity of such an algorithm should be O(N!) if iam not mistaken, is there any solution that runs faster beside the look up table ?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Forming a Magic Square
You are viewing a single comment's thread. Return to all comments →
but using this approach you will generate 9! permutation, wich is 362880, isnt this too much ? the complexity of such an algorithm should be O(N!) if iam not mistaken, is there any solution that runs faster beside the look up table ?