400. Nth Digit

400. Nth Digit

Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, … Note:…

645. Set Mismatch

645. Set Mismatch

The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of …

202. Happy Number

202. Happy Number

Write an algorithm to determine if a number is “happy”. A happy number is a number defin…

258. Add Digits

258. Add Digits

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.…

441. Arranging Coins

441. Arranging Coins

You have a total of n coins that you want to form in a staircase shape, where every k-th row must ha…

168. Excel Sheet Column Title

168. Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet. For exa…

231. Power of Two

231. Power of Two

Given an integer, write a function to determine if it is a power of two. class Solution { public boo…

263. Ugly Number

263. Ugly Number

Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers…

507. Perfect Number

507. Perfect Number

We define the Perfect Number is a positive integer that is equal to the sum of all its positive divi…

172. Factorial Trailing Zeroes

172. Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in log…

返回顶部