摘要:
First non-repeating character in a stream Given an input stream of n characters consisting only of small case alphabets the task is to find the first 阅读全文
posted @ 2017-04-20 17:07
PKICA
阅读(449)
评论(0)
推荐(0)
摘要:
transform的功能类似于for_each,但是transform,传参数一次拷贝,返回时一次拷贝,不能保证按序执行,而for_each传参使用引用,不需要拷贝,可以保证有序执行。 std::transform Defined in header <algorithm> template< cl 阅读全文
posted @ 2017-04-16 10:52
PKICA
阅读(868)
评论(0)
推荐(0)
摘要:
C++11:C++11包括大量的新特性:包括lambda表达式,类型推导关键字auto、decltype,和模板的大量改进。 新的关键字 auto C++11中引入auto第一种作用是为了自动类型推导 auto的自动类型推导,用于从初始化表达式中推断出变量的数据类型。通过auto的自动类型推导,可以 阅读全文
posted @ 2017-04-14 11:09
PKICA
阅读(66058)
评论(11)
推荐(6)
摘要:
值得学习的leetcoder: uwi Location Japan Neal Zane Neal@阳谷县 School:SJTU 你瞧,leetcode都让我们稍事休息了。2017-04-11 19:29 这都不重要,我想说的是:leetcode是一个目前我所见的online judge中最好的一 阅读全文
posted @ 2017-04-11 19:29
PKICA
阅读(535)
评论(0)
推荐(0)
摘要:
Output: [5] [7] [7] [5] 5 [5] [7] [7] [5] 5 阅读全文
posted @ 2017-04-06 12:31
PKICA
阅读(294)
评论(0)
推荐(0)
摘要:
C++ constexpr类型说明符 const 和 constexpr 变量之间的主要区别在于:const 变量的初始化可以延迟到运行时,而 constexpr 变量必须在编译时进行初始化。所有 constexpr 变量均为常量,因此必须使用常量表达式初始化。 constexpr 函数是在使用需要 阅读全文
posted @ 2017-04-05 21:55
PKICA
阅读(4622)
评论(1)
推荐(2)
浙公网安备 33010602011771号