03 2018 档案

摘要:Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: 使用K 阅读全文
posted @ 2018-03-11 12:52 immjc 阅读(138) 评论(0) 推荐(0)
摘要:1、字符串包含问题 1)串的模式匹配算法 (LintCode:字符串查找) BF KMP 阅读全文
posted @ 2018-03-11 12:32 immjc 阅读(146) 评论(0) 推荐(0)
摘要:Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected e 阅读全文
posted @ 2018-03-07 22:52 immjc 阅读(133) 评论(0) 推荐(0)
摘要:关于对结构体求sizeof。需要考虑一下几点: 1、内存对齐 2、机器的位数(32 or 64) 3、是否含有虚函数 4、继承关系 5、static不归入sizeof 6、普通成员函数与sizeof无关 以32位系统为例 Exp 1 空类:占用1个字节。 Exp 2 虚函数:占用4个字节 Exp 3 阅读全文
posted @ 2018-03-07 22:05 immjc 阅读(971) 评论(0) 推荐(0)
摘要:Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri 阅读全文
posted @ 2018-03-05 17:37 immjc 阅读(191) 评论(0) 推荐(0)