I'm about to graduate with an MS in Aerospace Engineering, but most of the jobs I'm applying to require some kind of coding test (HackerRank/Codility) as an initial screen. Unfortunately I've never taken a class on algorithms and data structures, so am looking at ways to improve my skills in these areas. I've picked up "Cracking the Coding Interview", and am currently starting to go through exercises, but have a question. I've only just started, but it seems that the expectations of on-site and online tests would be very different. If we consider question 1.3 (called "URLify") in the above book, it simply asks us to replace all spaces in a string with "%20". If I were to do this in Python, and had been given the following string
s = "Stop it Jeff."
I'd just write
s2 = s.replace(" ", "%20")
But, this seems too easy, so I feel like I'm going about this the wrong way and should try and solve it without the help of built-in functions. However, in online tests it seems that we're unrestricted in how we solve problems, and in on-site interviews they want us to use more fundamental approaches (i.e. using a for loop and other basic functions in the above example). So is it the case then, that I should expect more "difficult" questions in online tests since we can generally use any functions we want, and "easier" questions in on-site interviews with the expectation that you won't use any fancy functions to solve a problem? Difficult and easier are obviously not the correct words to use here, as an "easy" on-site question may be very difficult to solve because of the above mentioned expectations of using fundamentals to solve the problem. Any help would be much appreciated, as I'm quite confused as to how to proceed.