码迷,mamicode.com
首页 >  
搜索关键字:pointers on c    ( 570个结果
leetcode-116-Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each Nod Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate...
分类:其他好文   时间:2015-06-27 09:59:32    阅读次数:114
c++11 shared_ptr & unique_ptr & move semantics(右值引用)
just read it smart_ptr: https://mbevin.wordpress.com/2012/11/18/smart-pointers/ move: https://mbevin.wordpress.com/2012/11/20/move-semantics/...
分类:编程语言   时间:2015-06-26 13:03:36    阅读次数:237
More Effective C++ 条款1 仔细区别pointers和references
1. 初始化的区别:有空指针(NULL),但没有空引用,和const变量一样,引用一旦定义就必须和对象绑定。(当然char* pc=0;char& rc=*pc;也合法但无意义) 由此造成的影响: 1) dynamic_cast,对于指针的down_cast,如果失败就返回空指针,但由于没...
分类:编程语言   时间:2015-06-25 22:52:48    阅读次数:136
[LeetCode] Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Hide TagsLinked ListTwo Pointers分析:经典的快慢指针...
分类:其他好文   时间:2015-06-23 17:44:18    阅读次数:99
#16 3Sum Closest
题目链接:https://leetcode.com/problems/3sum-closest/ Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three i...
分类:其他好文   时间:2015-06-22 17:56:00    阅读次数:110
#15 3Sum
题目链接:https://leetcode.com/problems/3sum/ Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum o...
分类:其他好文   时间:2015-06-22 17:55:41    阅读次数:90
Populating Next Right Pointers in Each Node
Description:Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each...
分类:其他好文   时间:2015-06-20 16:57:34    阅读次数:74
Populating Next Right Pointers in Each Node II
Description:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous s...
分类:其他好文   时间:2015-06-20 16:53:04    阅读次数:79
智能指针(smart pointer)(2):unique_ptr
Unique pointer:   Manages the storage of a pointer, providing a limited garbage-collection facility, with little to no overhead over built-in pointers (depending on the deleter used).    These obje...
分类:其他好文   时间:2015-06-18 22:20:18    阅读次数:182
[LeetCode][JavaScript]Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLi...
分类:编程语言   时间:2015-06-17 00:30:04    阅读次数:137
570条   上一页 1 ... 30 31 32 33 34 ... 57 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!