上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 50 下一页
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit 阅读全文
posted @ 2018-03-31 02:59 轻风舞动 阅读(944) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2018-03-30 09:06 轻风舞动 阅读(532) 评论(0) 推荐(0) 编辑
摘要: Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ident 阅读全文
posted @ 2018-03-30 08:50 轻风舞动 阅读(346) 评论(0) 推荐(0) 编辑
摘要: You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that a 阅读全文
posted @ 2018-03-30 07:50 轻风舞动 阅读(1669) 评论(0) 推荐(0) 编辑
摘要: 9.8 Given an infinite number of quarters (25 cents), dimes (10 cents), nickels (5 cents) and pennies (1 cent), write code to calculate the number of w 阅读全文
posted @ 2018-03-30 05:30 轻风舞动 阅读(381) 评论(0) 推荐(0) 编辑
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2018-03-30 05:29 轻风舞动 阅读(1468) 评论(0) 推荐(0) 编辑
摘要: Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. 阅读全文
posted @ 2018-03-30 05:16 轻风舞动 阅读(528) 评论(0) 推荐(0) 编辑
摘要: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文
posted @ 2018-03-30 05:06 轻风舞动 阅读(664) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2018-03-30 04:55 轻风舞动 阅读(622) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
posted @ 2018-03-30 04:48 轻风舞动 阅读(1603) 评论(0) 推荐(0) 编辑
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 50 下一页