I have problem where there are two numbers given x and n , the task is to find a power of x which is just equal or smaller than n . I know i can do this by starting a loop but it seems not so efficient solution, i want to know any solution which is in o(1) or something efficient.
Aucun commentaire:
Enregistrer un commentaire