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.
Yes, agree, annoing test for this solution. The solution should not depend on tests. The most straitforward is to sort array and compare string i, and i+1. there is also more optimal solution even without sorting. Unfortunately test case rely on the specific non optimal brute force solution. This is not advance test if you ecourage others on this simplistic unefficicient solution to deal with (n*n)/2 string comparisons!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
No Prefix Set
You are viewing a single comment's thread. Return to all comments →
Yes, agree, annoing test for this solution. The solution should not depend on tests. The most straitforward is to sort array and compare string i, and i+1. there is also more optimal solution even without sorting. Unfortunately test case rely on the specific non optimal brute force solution. This is not advance test if you ecourage others on this simplistic unefficicient solution to deal with (n*n)/2 string comparisons!