作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 字典统计每位数字出现的次数 日期 题目地址:https://leetcode.com/problems/reordered-power-of-2/description/ 题目描述 Starting with a positive integer N, we reorder the digits in any order (including the…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 递归 迭代 位运算 函数法 日期 [LeetCode] 题目地址:https://leetcode.com/problems/power-of-four/ Total Accepted: 9305 Total Submissions: 28083 Difficulty: Easy 题目描述 Given an integer (signed 32 bi…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 二进制 位运算 判断是不是最大2的幂的因数 判断因子是不是只有2 日期 [LeetCode] 题目地址:https://leetcode.com/problems/power-of-two/ Total Accepted: 71172 Total Submissions: 194399 Difficulty: Easy 题目描述 Given an i…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 循环 递归 取对数 判断是不是最大3的倍数的因子 日期 [LeetCode] 题目地址:https://leetcode.com/problems/power-of-three/ Total Accepted: 38705 Total Submissions: 105634 Difficulty: Easy 题目描述 Given an integer…
function reorderedPowerOf2(N) { var a1 = N.toString().split('') a1.sort((a, b) => a.localeCompare(b) ) var s1 = a1.join('') for (let i = 0; i < 31; i++) { var a2 = String(1 << i).split('') a2.sort((a, b) => a.localeCompare(b) ) if (s1 === a…
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 迭代 递归 日期 [LeetCode] 题目地址:https://leetcode.com/problems/reverse-linked-list/ Total Accepted: 105474 Total Submissions: 267077 Difficulty: Easy 题目描述 Reverse a singly linked list.…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 递归 日期 题目地址:https://leetcode.com/problems/maximum-binary-tree/description/ 题目描述 Given an integer array with no duplicates. A maximum tree building on this array is defined as fol…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 回溯法 循环 日期 题目地址:https://leetcode.com/problems/letter-case-permutation/description/ 题目描述 Given a string S, we can transform every letter individually to be lowercase or uppercase…
[LeetCode]760. Find Anagram Mappings 解题报告 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/find-anagram-mappings/description/ 题目描述: Given two lists Aand B, and B is an anagram of A. B is an anagram of A means B is made by randomizing the order o…
[LeetCode]Pascal's Triangle II 解题报告 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/pascals-triangle-ii/description/ 题目描述: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could yo…