上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 54 下一页
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文
posted @ 2017-01-03 10:07 北叶青藤 阅读(284) 评论(0) 推荐(0)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2017-01-03 09:58 北叶青藤 阅读(230) 评论(0) 推荐(0)
摘要: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. For example,MovingAverage m = new Mo 阅读全文
posted @ 2017-01-03 06:49 北叶青藤 阅读(133) 评论(0) 推荐(0)
摘要: Given an 2D board, count how many different battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. Y 阅读全文
posted @ 2017-01-03 00:20 北叶青藤 阅读(256) 评论(0) 推荐(0)
摘要: In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2017-01-02 02:26 北叶青藤 阅读(352) 评论(0) 推荐(0)
摘要: From: http://www.geeksforgeeks.org/find-number-of-triangles-possible/ Given an unsorted array of positive integers. Find the number of triangles that 阅读全文
posted @ 2017-01-01 05:34 北叶青藤 阅读(497) 评论(0) 推荐(0)
摘要: Find the K closest points to a target point in a 2D plane. 阅读全文
posted @ 2017-01-01 04:16 北叶青藤 阅读(669) 评论(0) 推荐(0)
摘要: Path Sum I Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the g 阅读全文
posted @ 2016-12-31 01:12 北叶青藤 阅读(285) 评论(0) 推荐(0)
摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2016-12-31 00:35 北叶青藤 阅读(155) 评论(0) 推荐(0)
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2016-12-30 11:03 北叶青藤 阅读(178) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 54 下一页