码迷,mamicode.com
首页 >  
搜索关键字:constant    ( 1663个结果
Min Stack
https://leetcode.com/problems/min-stack/Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Pu...
分类:其他好文   时间:2015-04-15 16:44:16    阅读次数:126
Swap Nodes in Pairs--LeetCode
Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You m...
分类:其他好文   时间:2015-04-13 12:58:22    阅读次数:77
Array STL
Arrays STL各种实现代码。 《C++标准程序库》 1 /* 2 2015.4 3 an STL container (as wrapper) for arrays of constant size. 4 5 */ 6 7 #pragma warning(disable :...
分类:其他好文   时间:2015-04-12 20:54:19    阅读次数:157
Leetcode: Swap Nodes in Pairs
题目: Given a linked list, swap every two adjacent nodes and return its head.For example, Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. You...
分类:其他好文   时间:2015-04-12 19:23:23    阅读次数:128
Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:其他好文   时间:2015-04-12 13:16:12    阅读次数:114
Struts2 中的constant 标签的配置
<!--指定Web应用的默认编码集.该属性对于处理中文请求参数非常有用...
分类:其他好文   时间:2015-04-12 09:22:02    阅读次数:146
leetcode之Sort List
Sort a linked list in O(n log n) time using constant space complexity.这道题属于人生中第一次对链表进行操作,首先,不同于C++中的struct,java中可以用一个类来定义一个数据结构。这道题一看没有任何思路,就看别人的代码,发现...
分类:其他好文   时间:2015-04-11 22:23:26    阅读次数:136
iOS 相同字符串地址
NSArray *helloWorld = @[@"world",@"hello"]; NSString *hello_Constant = @"hello"; NSString *helloFConstant = [NSString stringWithFormat:@"hel...
分类:移动开发   时间:2015-04-11 01:10:36    阅读次数:167
常量的自定义
常量可以理解为不变的量,一旦被定义,在脚本的其他任何地方都不可以被改变。如果使用变量来定义我们要的值也可以,但是在不知情的情况下,使用同一变量名时,变量就会被替换掉,从而应发执行错误自定义常量使用define()函数定义define( $constant_name, $value, [true/fa...
分类:其他好文   时间:2015-04-10 15:13:10    阅读次数:183
c++ const: const 变量, const 输入参数, const 返回值, const 成员函数
看到const 关键字,C++程序员首先想到的可能是const 常量。这可不是良好的条件反射。如果只知道用const 定义常量,那么相当于把火药仅用于制作鞭炮。const 更大的魅力是它可以修饰函数的参数、返回值,甚至函数的定义体。const 是constant 的缩写,“恒定不变”的意思。被con...
分类:编程语言   时间:2015-04-10 13:30:18    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!