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.
I don't understand this at all. How should I compute which function it is from just the inputs? The functions could be everything from linear to polynomial to exponential...
But as the problem said: The input is f(1), f(2) , f(3) ... f(n). The inverse of the the function would just be 1, 2, 3 ... n, shouldn't it?
Why doesnt this work?
Edit:
After reading the problem again I notice this:
... f: X -> X
So basically, f(x) = x. Is this why I just have to print out the input to pass the tests? (Besides, test case 4, don't undestand this as all)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Security Function Inverses
You are viewing a single comment's thread. Return to all comments →
I don't understand this at all. How should I compute which function it is from just the inputs? The functions could be everything from linear to polynomial to exponential...
But as the problem said: The input is f(1), f(2) , f(3) ... f(n). The inverse of the the function would just be 1, 2, 3 ... n, shouldn't it?
Why doesnt this work?
Edit:
After reading the problem again I notice this:
So basically, f(x) = x. Is this why I just have to print out the input to pass the tests? (Besides, test case 4, don't undestand this as all)