摘要:
题目 Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a li 阅读全文
摘要:
题目 Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, 阅读全文
摘要:
题目 Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in so 阅读全文
摘要:
题目 Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such 阅读全文
摘要:
题目 Given a triangle array, return the minimum path sum from top to bottom. For each step, you may move to an adjacent number of the row below. More fo 阅读全文
摘要:
题目 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping 阅读全文
摘要:
题目 You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cli 阅读全文
摘要:
题目 Given a string s, you can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible 阅读全文
摘要:
题目 Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1 阅读全文
摘要:
题目 Given two integers n and k, return all possible combinations of k numbers out of the range [1, n]. You may return the answer in any order. Example 阅读全文