上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: 题目描述: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not 阅读全文
posted @ 2018-03-22 11:42 宵夜在哪 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 题目描述: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the tot 阅读全文
posted @ 2018-03-21 19:23 宵夜在哪 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 基本概念: 对已有的运算符赋予多重的含义 使同一运算符作用于不同类型的数据时,有不同类型的行为 目的是扩展C++中提供的运算符的适用范围,以用于类所表示的抽象数据类型 运算符重载的实质是函数重载: 返回值类型 operator 运算符(形参表) { } 可重载为普通函数和成员函数,成员函数的形参中因 阅读全文
posted @ 2018-03-20 17:54 宵夜在哪 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserv 阅读全文
posted @ 2018-03-20 17:14 宵夜在哪 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Giv 阅读全文
posted @ 2018-03-19 18:01 宵夜在哪 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). 阅读全文
posted @ 2018-03-18 22:15 宵夜在哪 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your func 阅读全文
posted @ 2018-03-17 13:27 宵夜在哪 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where 阅读全文
posted @ 2018-03-16 20:10 宵夜在哪 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. 阅读全文
posted @ 2018-03-15 18:21 宵夜在哪 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 常量对象: 如果不希望某个对象的值被改变,则定义该对象的时候可以在前面加const关键字。常量对象只能调用类中的常量成员函数。 const 类名 对象名; 常量成员函数: 如果不希望类中的某个函数修改类中的值,则定义该成员函数的时候可以在后面加const关键字。 常量成员函数不能修改本类的成员变量( 阅读全文
posted @ 2018-03-15 14:24 宵夜在哪 阅读(965) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页