摘要: Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A so that the result equals B. Example 1: Input: 阅读全文
posted @ 2018-07-10 13:25 wz30 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] Follow up: Recursive so 阅读全文
posted @ 2018-07-09 13:14 wz30 阅读(106) 评论(0) 推荐(0) 编辑
摘要: The ability to debug and overall thinking need to improve Given a string, find the first non-repeating character in it and return it's index. If it do 阅读全文
posted @ 2018-06-09 01:06 wz30 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2018-06-08 23:29 wz30 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Count the number of prime numbers less than a non-negative number, n. Example: Solution2: ssieving: need a helping array with false initialization: fa 阅读全文
posted @ 2018-06-08 23:09 wz30 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2018-06-06 01:47 wz30 阅读(112) 评论(0) 推荐(0) 编辑
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文
posted @ 2018-06-04 23:02 wz30 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2018-06-03 11:49 wz30 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: 阅读全文
posted @ 2018-06-02 12:23 wz30 阅读(123) 评论(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 may a 阅读全文
posted @ 2018-06-02 10:41 wz30 阅读(206) 评论(0) 推荐(0) 编辑