摘要: [抄题]: Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when 阅读全文
posted @ 2018-03-24 22:30 苗妙苗 阅读(120) 评论(0) 推荐(0)
摘要: [抄题]: [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: [一句话思路]: 两个单词的话,就是看谁长 [输入量]:空: 正常情况:特大:特小:程序里处理到的特殊情况:异常情况(不合法不合理的输入): 阅读全文
posted @ 2018-03-24 22:07 苗妙苗 阅读(100) 评论(0) 推荐(0)
摘要: [抄题]: Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You 阅读全文
posted @ 2018-03-24 21:07 苗妙苗 阅读(146) 评论(0) 推荐(0)
摘要: [抄题]: Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return - 阅读全文
posted @ 2018-03-24 16:43 苗妙苗 阅读(132) 评论(0) 推荐(0)
摘要: [抄题]: Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's 阅读全文
posted @ 2018-03-24 15:47 苗妙苗 阅读(154) 评论(0) 推荐(0)