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.
Hey there, you are right. That is allowed on competitive programming, the main task is to obtain a result that meets the expected performance in time and in memory. However, (IMO) these problems here in Hackerrank have the purpose of practice and to get used to use different types of data structures and algorithms in order to solve different type of problems. In that sense, you should focus on using the data structures or algorithms suggested for each problem. Sometimes is kind of harder that way but also sometimes you will learn to use data structures / algorithms in a different way you are used to (with 'tweaks'). IMO That is the practice that is intented for you; to learn new ways of using some data structures that you may have never used. In that way you improve your knowledge as an overall. And there will be harder problems where this kind of learned 'tweaks' will make sense. As conclusion, don't take the data structure or algorithm type of the problem as a constraint but as a challenge!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Equal Stacks
You are viewing a single comment's thread. Return to all comments →
Hey there, you are right. That is allowed on competitive programming, the main task is to obtain a result that meets the expected performance in time and in memory. However, (IMO) these problems here in Hackerrank have the purpose of practice and to get used to use different types of data structures and algorithms in order to solve different type of problems. In that sense, you should focus on using the data structures or algorithms suggested for each problem. Sometimes is kind of harder that way but also sometimes you will learn to use data structures / algorithms in a different way you are used to (with 'tweaks'). IMO That is the practice that is intented for you; to learn new ways of using some data structures that you may have never used. In that way you improve your knowledge as an overall. And there will be harder problems where this kind of learned 'tweaks' will make sense. As conclusion, don't take the data structure or algorithm type of the problem as a constraint but as a challenge!