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.
Although the solution is nice, a question that comes to mind is how fast does the code above run for larger values of n compared to just the traditional single for loop pass, iterating through both lists at once - considering that you are given the initial size of the lists.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
Although the solution is nice, a question that comes to mind is how fast does the code above run for larger values of n compared to just the traditional single for loop pass, iterating through both lists at once - considering that you are given the initial size of the lists.