码迷,mamicode.com
首页 >  
搜索关键字:definition    ( 2735个结果
LeetCode – Refresh – Minimum Depth of Binary Tree
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i...
分类:其他好文   时间:2015-03-21 08:35:28    阅读次数:123
LeetCode – Refresh – Merge Intervals
1 /** 2 * Definition for an interval. 3 * struct Interval { 4 * int start; 5 * int end; 6 * Interval() : start(0), end(0) {} 7 * ...
分类:其他好文   时间:2015-03-21 07:32:56    阅读次数:121
LeetCode – Refresh – Merge k Sorted Lists
Use merge two looply merge the from the queue. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNod...
分类:其他好文   时间:2015-03-21 07:30:23    阅读次数:126
LeetCode – Refresh – Maximum Depth of Binary Tree
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i...
分类:其他好文   时间:2015-03-21 06:22:17    阅读次数:111
第十章.枚举
来源枚举定义了一个通用类型的一组相关的值,使你可以在你的代码中以一个安全的方式来使用这些值。枚举语法(Enumeration Syntax)使用enum关键词并且把它们的整个定义放在一对大括号内:enum SomeEumeration { // enumeration definition ...
分类:其他好文   时间:2015-03-20 17:43:36    阅读次数:166
【LeetCode】Swap Nodes in Pairs 链表指针的应用
题目:swap nodes in pairs /** * LeetCode Swap Nodes in Pairs * 题目:输入一个链表,要求将链表每相邻的两个节点交换位置后输出 * 思路:遍历一遍即可,时间复杂度O(n) * Definition for singly-linked list. * public class ListNode { * int val; ...
分类:其他好文   时间:2015-03-20 14:29:30    阅读次数:113
LeetCode – Refresh – Max Points on a Line
Notes:1. Do not forget to check xi == xj. It will cause INF.2. DO not forget to initialize the iterator. 1 /** 2 * Definition for a point. 3 * struc.....
分类:其他好文   时间:2015-03-20 09:17:17    阅读次数:93
LeetCode – Refresh – Linked List Cycle
Just use two pointers. CC150 classical question 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNo...
分类:其他好文   时间:2015-03-20 08:06:22    阅读次数:125
LeetCode – Refresh – Linked List Cycle II
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne...
分类:其他好文   时间:2015-03-20 08:03:53    阅读次数:125
LeetCode – Refresh – Insertion Sort List
Do not forget to break the inner loop, when you find the insert position. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * ...
分类:其他好文   时间:2015-03-20 06:56:19    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!