随笔分类 -  Math

摘要:Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2016-12-05 10:17 微微程序媛 阅读(122) 评论(0) 推荐(0)
摘要:There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2016-12-05 07:35 微微程序媛 阅读(211) 评论(0) 推荐(0)
摘要:Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... Note:n is positive and will fit within the range of a 32-bi 阅读全文
posted @ 2016-12-04 12:14 微微程序媛 阅读(131) 评论(0) 推荐(0)
摘要:You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it is poss 阅读全文
posted @ 2016-11-28 12:34 微微程序媛 阅读(405) 评论(0) 推荐(0)
摘要:Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. Credits:Special thanks t 阅读全文
posted @ 2016-11-25 07:14 微微程序媛 阅读(99) 评论(0) 推荐(0)
摘要:Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n  阅读全文
posted @ 2016-11-25 01:23 微微程序媛 阅读(295) 评论(0) 推荐(0)
摘要:Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as s 阅读全文
posted @ 2016-10-16 12:49 微微程序媛 阅读(160) 评论(0) 推荐(0)