11 2015 档案
摘要:Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the or
阅读全文
摘要:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
阅读全文
摘要:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl...
阅读全文
摘要:新建项目: cocos new -p xxx.xxx.xxx -l cpp xxx -d xxx是自定义名字 -d为指定目录不指定该命令行参数,默认为当前目录 该随笔用来记录碰到的琐碎的API,以加深印象,以后找起来也方便。 场景: Director::getInstance()->replaceS
阅读全文
摘要:新建的cocos2Dx工程默认的是一个helloworld工程,里面包含了2个类文件,一个是AppDelegate,一个是HelloworldScene类文件(这个类叫HellowWorld,为什么类文件和类名不一样这一点让我觉得挺不爽的。)在AppDelegate内主要进行“导演“的初始化,设置显...
阅读全文
摘要:map即一个键值对应的数组,可以用键而不仅仅是数字作为索引。初始化:map mapOfVec; 新建了一个string为键int为值的map可以使用mapOfVec[“键”] = “值” 来进行赋值mapOfVec.count(k) 方法返回 Key为 k的元素个数,若无则返回0mapOfVec.c...
阅读全文
摘要:You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatena...
阅读全文

浙公网安备 33010602011771号