397. Integer Replacement

Given a positive integer n and you can do operations as follow:java If n is even, replace n with n/2. If n is odd, you can replace n with either n + 1 or n - 1. What is the minimum number of replaceme
相關文章
相關標籤/搜索