LeetCode - Missing Number
LeetCode 的 Missing Number 題目如下: Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array. ...
LeetCode 的 Missing Number 題目如下: Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array. ...
LeetCode 的 Move Zeroes 題目如下: Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. ...
LeetCode 的 Number of 1 Bits 題目如下: Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight). ...
LeetCode 的 Power of Three 題目如下: Given an integer, write a function to determine if it is a power of three. ...
LeetCode 的 Add Digits 題目如下: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. ...
LeetCode 的 Happy Number 題目如下: Write an algorithm to determine if a number is “happy”. ...
LeetCode 的 Roman to Integer 題目如下: Given a roman numeral, convert it to an integer. ...
LeetCode 的 Length of Last Word 題目如下: Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string. ...
LeetCode 的 Power of Two 題目如下: Given an integer, write a function to determine if it is a power of two. ...
LeetCode 的 Valid Anagram 題目如下: Given two strings s and t, write a function to determine if t is an anagram of s. ...