上一页 1 ··· 19 20 21 22 23
摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the 阅读全文
posted @ 2016-04-11 14:58 Black_Knight 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2016-04-11 14:49 Black_Knight 阅读(148) 评论(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-04-10 19:08 Black_Knight 阅读(204) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-04-08 11:30 Black_Knight 阅读(164) 评论(0) 推荐(0) 编辑
摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2016-04-07 18:10 Black_Knight 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given an integer, write a function to determine if it is a power of two. Credits:Special thanks to @jianchao.li.fighter for adding this problem and cr 阅读全文
posted @ 2016-04-07 17:15 Black_Knight 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Java对数函数的计算方法非常有问题,然而在API中却有惊人的误差。但是假如运用了以下的方法,用Java处理数字所碰到的小麻烦就可以轻而易举的解决了。 Sun的J2SE提供了一个单一的Java对数方法——double java.lang.Math.log(double),这很轻易使用。请看如下代码: 阅读全文
posted @ 2016-04-07 17:10 Black_Knight 阅读(22703) 评论(1) 推荐(2) 编辑
上一页 1 ··· 19 20 21 22 23