随笔分类 -  Math

摘要:[抄题]: A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0 阅读全文
posted @ 2018-05-03 09:17 苗妙苗 阅读(314) 评论(0) 推荐(0)
摘要:[抄题]: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: Example 1: Example 2: Example 3: [暴力解法 阅读全文
posted @ 2018-05-01 22:05 苗妙苗 阅读(228) 评论(0) 推荐(0)
摘要:[抄题]: Given a column title as appear in an Excel sheet, return its corresponding column number. For example: Example 1: Example 2: Example 3: [暴力解法]: 阅读全文
posted @ 2018-05-01 17:04 苗妙苗 阅读(437) 评论(0) 推荐(0)
摘要:[抄题]: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is 阅读全文
posted @ 2018-05-01 16:08 苗妙苗 阅读(147) 评论(0) 推荐(0)
摘要:[抄题]: 将一个整数中的数字进行颠倒,当颠倒后的整数溢出时,返回 0 (标记为 32 位整数)。 将一个整数中的数字进行颠倒,当颠倒后的整数溢出时,返回 0 (标记为 32 位整数)。 将一个整数中的数字进行颠倒,当颠倒后的整数溢出时,返回 0 (标记为 32 位整数)。 样例 给定 x = 12 阅读全文
posted @ 2018-05-01 11:33 苗妙苗 阅读(143) 评论(0) 推荐(0)
摘要:[抄题]: Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Example 2: Examp 阅读全文
posted @ 2018-05-01 10:18 苗妙苗 阅读(114) 评论(0) 推荐(0)
摘要:[抄题]: Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses. Now, you are g 阅读全文
posted @ 2018-04-28 11:19 苗妙苗 阅读(115) 评论(0) 推荐(0)
摘要:[抄题]: Count the number of prime numbers less than a non-negative number, n. [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: 阅读全文
posted @ 2018-04-23 22:13 苗妙苗 阅读(383) 评论(0) 推荐(0)
摘要:[抄题]: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizonta 阅读全文
posted @ 2018-04-23 15:35 苗妙苗 阅读(121) 评论(0) 推荐(0)
摘要:[抄题]: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note:You have to rotate the image in-place, 阅读全文
posted @ 2018-02-22 17:46 苗妙苗 阅读(239) 评论(0) 推荐(0)