摘要: 题目: 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 -1. 阅读全文
posted @ 2018-09-13 20:57 chan_ai_chao 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 题目: Write a function to find the longest common prefix string amongst an array of strings. 编写一个函数来查找字符串数组中最长的公共前缀字符串。 If there is no common prefix, re 阅读全文
posted @ 2018-09-13 20:36 chan_ai_chao 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. 给定字符串s由大写/小写 阅读全文
posted @ 2018-09-13 19:59 chan_ai_chao 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. 给定非负整数c,您的任务是确定是否存在两个整数a和b,使得a 阅读全文
posted @ 2018-09-13 10:09 chan_ai_chao 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 给定非空字符串s,您最多可以删除一个字符。 判断你是否可以成为回文。 E 阅读全文
posted @ 2018-09-13 09:07 chan_ai_chao 阅读(85) 评论(0) 推荐(0) 编辑