摘要:
C++Memset误区C++ 哈希表C++类型转换[转]C++ sizeofC++ 路径中\\与/ 阅读全文
posted @ 2013-09-19 16:47
懒猫欣
阅读(107)
评论(0)
推荐(0)
摘要:
从2011年开始,C++支持非排序的unordered_map和unordered_set(原先的map和set都是通过有序结构实现的)下面是一些性能上的测试#include#include#include#include#include#include#include#includeusing namespace std;int main(){ int n=100000; vector vec; srand(unsigned(time(0))); for(int i=0;i tm; unordered_sethm; start=clock(); for(int i=0;i#include#i 阅读全文
posted @ 2013-09-19 16:45
懒猫欣
阅读(426)
评论(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 which represents the number 123.Find the total sum of all root-to-leaf numbers.For example, 1 / \ 2 3 The root-to-leaf path 1->2 represents the nu 阅读全文
posted @ 2013-09-19 15:29
懒猫欣
阅读(151)
评论(0)
推荐(0)
摘要:
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word must exist in the dictionaryFor example, Given:start = "hit"end = "cog"dict = ["hot&quo 阅读全文
posted @ 2013-09-19 15:13
懒猫欣
阅读(199)
评论(0)
推荐(0)
浙公网安备 33010602011771号