上一页 1 2 3 4 5 6 7 ··· 13 下一页
摘要: 题目描述: 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-04-01 00:25 宵夜在哪 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one. 解题思路: 这题还是用136也就 阅读全文
posted @ 2018-03-30 23:38 宵夜在哪 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X 阅读全文
posted @ 2018-03-29 11:13 宵夜在哪 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2018-03-28 17:09 宵夜在哪 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 继承关系: “是”的关系 B是基类A的一个派生类 逻辑上要求:“一个B对象也是一个A对象”。 例: “男人”是一个“人”,“女人”也是一个“人”,因此“男人”和“女人”就可以从“人”中继承得到,但男人和女人不能互相继承。 复合关系: “有”关系 类C中“有”成员变量k,k是类D的对象,则C和D是复合 阅读全文
posted @ 2018-03-27 19:56 宵夜在哪 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 概念: 继承:在定义一个新的类B时,如果该类与某个已有的类A相似(指的是B拥有A的全部特点),那么就可以把A作为一个基类,而把B作为基类的一个派生类(也称子类) 派生类可以对基类进行扩充(成员函数和成员变量) 派生类一经定义后,可以独立使用,不依赖于基类。 派生类拥有基类的全部成员函数和成员变量,无 阅读全文
posted @ 2018-03-27 19:29 宵夜在哪 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given 阅读全文
posted @ 2018-03-26 09:10 宵夜在哪 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree 阅读全文
posted @ 2018-03-25 23:26 宵夜在哪 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary 阅读全文
posted @ 2018-03-24 22:11 宵夜在哪 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree [1,null,2,3], return [1,3,2]. Note: Recur 阅读全文
posted @ 2018-03-23 22:23 宵夜在哪 阅读(80) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 13 下一页