上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 77 下一页
摘要: [抄题]: 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)
摘要: [抄题]: [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: 最后一位是空格,可能误判lastindexof()。所以必须用.trim() [思维问题]: [一句话思路]: 用函数 再次强调是最后一位的索引是lengt 阅读全文
posted @ 2018-03-20 23:05 苗妙苗 阅读(149) 评论(0) 推荐(0)
摘要: [抄题]: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: [暴力解法]: 时间分析 阅读全文
posted @ 2018-03-20 21:10 苗妙苗 阅读(206) 评论(0) 推荐(0)
摘要: [抄题]: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a cana 阅读全文
posted @ 2018-03-19 22:19 苗妙苗 阅读(266) 评论(0) 推荐(0)
摘要: [抄题]: Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Gi 阅读全文
posted @ 2018-03-19 20:15 苗妙苗 阅读(175) 评论(0) 推荐(0)
摘要: [抄题]: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if th 阅读全文
posted @ 2018-03-19 11:49 苗妙苗 阅读(159) 评论(0) 推荐(0)
摘要: [抄题]: Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word or 阅读全文
posted @ 2018-03-19 09:16 苗妙苗 阅读(147) 评论(0) 推荐(0)
摘要: [抄题]: Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to  阅读全文
posted @ 2018-03-19 08:38 苗妙苗 阅读(132) 评论(0) 推荐(0)
上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 77 下一页