Climb Stairs
Suppose we have a ladder which has n steps. Each time you can either climb 1 or 2 steps.
该标签下的全部文章。
Suppose we have a ladder which has n steps. Each time you can either climb 1 or 2 steps.
有 n 个不同价值的硬币排成一条线。两个参赛者轮流从右边依次拿走 1 或 2 个硬币,直到没有硬币为止。计算两个人分别拿到的硬币总价值,价值高的人获胜。
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where t
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the cand
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai).
A message containing letters from A-Z is being encoded to numbers using the following mapping: