摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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. 阅读全文
摘要:
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 阅读全文
摘要:
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
摘要:
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
摘要:
Given a non-empty array of integers, return the k most frequent elements. Example 1: Example 2: Input: nums = [1], k = 1 Output: [1] Example 2: Note: 阅读全文