LeetCode 231. Power of Two
Description https://leetcode.com/problems/power-of-two/ Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two,…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/power-of-two/ Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two,…
Description https://leetcode.com/problems/binary-string-with-substrings-representing-1-to-n/ Given a binary string s (a string consisting only of ‘0’ and ‘1’s) and a positive integer n, return true if…
Description https://leetcode.com/problems/majority-element-ii/ Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Follow-up: Could you solve…
Description https://leetcode.com/problems/matrix-block-sum/ Given the root of a binary tree, return the same tree where every subtree (of the given tree) not containing a 1 has…
Description https://leetcode.com/problems/matrix-block-sum/ Given a m x n matrix mat and an integer k, return a matrix answer where each answer[i][j] is the sum of all elements mat[r][c] for: i – k <=…
Description https://leetcode.com/problems/maximum-product-of-three-numbers/ Given an integer array nums, find three numbers whose product is maximum and return the maximum product. Example 1: Input:…
Description https://leetcode.com/problems/linked-list-cycle-ii/ Given a linked list, return the node where the cycle begins. If there is no cycle, return null. There…
Description https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii/ Given two nodes of a binary tree p and q, return their lowest common ancestor (LCA). Each node will have a reference to its…
Introduction This is a GoodTecher compiled list. Each question is a typical question for the category it represents. To solve…
Description https://leetcode.com/problems/find-k-length-substrings-with-no-repeated-characters/ Given two strings s and goal, return true if you can swap two letters in s so the result is equal to goal, otherwise, return false. Swapping…