Tech | 技术笔记
-
257. Binary Tree Paths
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 …
-
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
The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of …
-
202. Happy Number
Write an algorithm to determine if a number is “happy”. A happy number is a number defin…
-
258. Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.…
-
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
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For exa…
-
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
Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers…
-
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
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in log…
-
171. Excel Sheet Column Number
Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, retur…
-
633. Sum of Square Numbers
Given a non-negative integer c, your task is to decide whether there’re two integers a and b s…
-
598. Range Addition II
Given an m * n matrix M initialized with all 0‘s and several update operations. Operations are…
-
326. Power of Three
Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it…