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.
you can bring described algorithms to any programming language.
Just do it. I don't think that you expect just to copy and paste a public solution and then say: "i have done it" :)
I realized it with python 3. All inclusive. Precomputation, Memoization and so on. Instead of standard sorting (O (n log ni) i used much faster method counting sort (O (n) as this is possible in this case, precompute that and process results in cooperation with mathematic formulas by subtract count lists of r and l position and process them. As already said. Don't expect that i will post it. This is a competition site where you should learn yourself, otherwise you are lying to yourself and cheat against the others ^^
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Anagrams
You are viewing a single comment's thread. Return to all comments →
you can bring described algorithms to any programming language. Just do it. I don't think that you expect just to copy and paste a public solution and then say: "i have done it" :) I realized it with python 3. All inclusive. Precomputation, Memoization and so on. Instead of standard sorting (O (n log ni) i used much faster method counting sort (O (n) as this is possible in this case, precompute that and process results in cooperation with mathematic formulas by subtract count lists of r and l position and process them. As already said. Don't expect that i will post it. This is a competition site where you should learn yourself, otherwise you are lying to yourself and cheat against the others ^^