摘要:
要求去除字符串首尾的空格。 阅读全文
摘要:
Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temp 阅读全文
摘要:
You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of stone 阅读全文
摘要:
友元 类可以允许其他类或函数访问它的非共有成员,办法是令其他类或函数成为它的友元。如果类想把一个函数作为它的友元,只需要添加一条以friend关键字开始的函数声明语句即可。 友元声明只能出现在类定义的内部,但是在类内出现的具体位置不限,友元不是类的成员也不受它所在区域访问控制级别的约束。 一般来说最 阅读全文
摘要:
构造函数 每个类都分别定义了它的对象被初始化的方式,类通过一个或几个特殊的成员函数来控制其对象的初始化过程,这些函数叫做构造函数。 构造函数的任务是初始化类对象的数据成员,无论何时只要类的对象被创建,就会执行构造函数。 构造函数的名字和类名相同。和其他函数不一样的是,构造函数没有返回类型;除此之外类 阅读全文
摘要:
Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文
摘要:
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
摘要:
Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. For ex 阅读全文
摘要:
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num 阅读全文
摘要:
Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文