LeetCode231——2的幂

我的LeetCode代码仓:https://github.com/617076674/LeetCode 原题链接:https://leetcode-cn.com/problems/power-of-two/description/ 题目描述: 知识点:位运算 思路一:每次除2判断其对2取余的值 时间复杂度是O(logn)。空间复杂度是O(1)。 JAVA代码: public class Solut
相关文章
相关标签/搜索