educative.io

Bad binary search problem in my opinion

You can just find the square root of k and drop the decimals. That will be faster than binary search

Hi @Tatenda_Zhou

You’re right, that is another way, quicker way to solve this problem. The time complexity of your approach would be O(1).