摘要: Given a string s consists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2017-06-25 16:50 王大咩的图书馆 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2017-06-25 16:32 王大咩的图书馆 阅读(593) 评论(0) 推荐(0) 编辑
摘要: Implement regular expression matching with support for'.'and'*'. 题意:' . '能匹配任意字符,‘ * ‘表示之前的那个字符可以是0个、1个或者多个,(注意:s= ba和 p= a*bc也是匹配的,*表示p中 * 之前的字符为0个,但 阅读全文
posted @ 2017-06-25 11:56 王大咩的图书馆 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo 阅读全文
posted @ 2017-06-25 02:26 王大咩的图书馆 阅读(2129) 评论(2) 推荐(0) 编辑
摘要: 本文是我对博友 BIT祝威 和Grandyang ,以及寒小阳关于最长回文子串上关于马拉车算法理解的整理,若是对我的整理有所不懂得,建议去看BIT祝威的博客,很详细,以下纯属个人不成熟的理解。 首先,得先了解什么是回文串(我之前就不是很了解,汗)。回文串就是正反读起来就是一样的,如“abba”。关于 阅读全文
posted @ 2017-06-24 01:46 王大咩的图书馆 阅读(13986) 评论(13) 推荐(5) 编辑
摘要: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes 阅读全文
posted @ 2017-06-23 22:31 王大咩的图书馆 阅读(2947) 评论(0) 推荐(0) 编辑
摘要: The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo 阅读全文
posted @ 2017-06-23 16:45 王大咩的图书馆 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 本文参考实验楼的SELECT 语句详解结合自己操作部分而写成。 注意:大多数系统中,SQL语句都是不区分大小写的,但是出于严谨和便于区分保留字和变量名,在书写的时,保留字应大写,而变量名应小写。所谓的保留字,即为:在高级语言中已定义过的字,使用者不能将这些字作为变量名和过程名使用。 1)SELECT 阅读全文
posted @ 2017-06-23 00:35 王大咩的图书馆 阅读(811) 评论(0) 推荐(1) 编辑
摘要: You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatena 阅读全文
posted @ 2017-06-22 17:24 王大咩的图书馆 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 操作过程使用实验楼。 首先是创建一个数据库studentsystem,使用语句是: CREATE DATABASE studentsystem; 查看创建好的数据库的命令还是SHOW DATABASES; 要在创建的数据库studentsystem中创建表格,首先要连接数据库,使用语句 USE <数 阅读全文
posted @ 2017-06-22 01:33 王大咩的图书馆 阅读(3680) 评论(0) 推荐(0) 编辑
摘要: 本文的是基于我对邓俊辉老师编著《数据结构(C++语言版)(第3版)》上关于KMP算法的理解,和网络上一些大神们写的博客,所写。建议将我写的关于implement strstr这题的博客和本篇连起来读。 不难发现,这里存在大量的局部匹配,针对暴力解法,若每次匹配的过程都是最后一位失配(即不匹配),文本 阅读全文
posted @ 2017-06-21 22:42 王大咩的图书馆 阅读(409) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack. 题意:判断一个字符是否在另一个中,若是,则返 阅读全文
posted @ 2017-06-21 19:47 王大咩的图书馆 阅读(364) 评论(0) 推荐(1) 编辑
摘要: Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-neg 阅读全文
posted @ 2017-06-20 17:33 王大咩的图书馆 阅读(663) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1is read off as"one 1"or11.11is read off as"t 阅读全文
posted @ 2017-06-20 16:31 王大咩的图书馆 阅读(358) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 思路:有关罗马数字的相关知识可见博客Integer to roman。从左往右遍历字 阅读全文
posted @ 2017-06-20 15:23 王大咩的图书馆 阅读(330) 评论(0) 推荐(0) 编辑