2019年6月1日

785. Is Graph Bipartite?( 判断是否为二分图)

摘要: Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it's set of nodes into two ind 阅读全文

posted @ 2019-06-01 23:57 shaer 阅读(134) 评论(0) 推荐(0) 编辑

2019年5月21日

二叉树

摘要: https://blog.csdn.net/qq_30507287/article/details/51442564 阅读全文

posted @ 2019-05-21 15:09 shaer 阅读(69) 评论(0) 推荐(0) 编辑

2019年5月14日

566. Reshape the Matrix( 改变矩阵维度)

摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文

posted @ 2019-05-14 21:31 shaer 阅读(255) 评论(0) 推荐(0) 编辑

283. Move Zeroes(把数组中的 0 移到末尾)

摘要: iven an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: 方法三:移位(记 阅读全文

posted @ 2019-05-14 21:01 shaer 阅读(190) 评论(0) 推荐(0) 编辑

2019年5月13日

20. Valid Parentheses(用栈实现括号匹配)

摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文

posted @ 2019-05-13 22:14 shaer 阅读(104) 评论(0) 推荐(1) 编辑

2019年5月11日

647. Palindromic Substrings(回文子字符串个数)

摘要: Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文

posted @ 2019-05-11 21:08 shaer 阅读(131) 评论(0) 推荐(0) 编辑

2019年5月10日

205. Isomorphic Strings(字符串同构)

摘要: 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 @ 2019-05-10 23:56 shaer 阅读(105) 评论(0) 推荐(0) 编辑

409. Longest Palindrome(计算一组字符集合可以组成的回文字符串的最大长度)

摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文

posted @ 2019-05-10 22:40 shaer 阅读(185) 评论(0) 推荐(0) 编辑

242. Valid Anagram(两个字符串包含的字符是否完全相同)

摘要: Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Example 2: Note:You may assume the string contains only 阅读全文

posted @ 2019-05-10 21:47 shaer 阅读(178) 评论(0) 推荐(0) 编辑

2019年5月2日

17. Letter Combinations of a Phone Number(电话号码的字母组合)

摘要: Medium 2069285FavoriteShare Medium 2069285FavoriteShare Given a string containing digits from 2-9 inclusive, return all possible letter combinations t 阅读全文

posted @ 2019-05-02 23:30 shaer 阅读(132) 评论(0) 推荐(0) 编辑

导航