Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubd ...
Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root. Note:The length of path between two nodes is r ...
2017-10-07 23:51 5 8843 推荐指数:
Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubd ...
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up ...
给定两个字符串,输出最长相同子串: 方法1:暴力破解 (2)动态规划,空间复杂度为O(n2),时间复杂度为O(n2),算法思想:a的第i+1个位置结尾的子串和b的第j+1个位置结尾的子串最大相同长度为a的以位置i结尾和b的以位置j结尾的最大相同子串长度+1,状态转移式为dp[i+1,j+1 ...
Given a binary tree, count the number of uni-value subtrees. A Uni ...
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique ...
longest palindromic substring. 求字符串的最长回文子串 算法 ...
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. ...
写在前面:忍不住吐槽几句今天上海的天气,次奥,鞋子里都能养鱼了...裤子也全湿了,衣服也全湿了,关键是这天气还打空调,只能瑟瑟发抖祈祷不要感冒了.... 前后切了一百零几道leetcode的题(solution同步在github),主要是拣难度系数定为easy的水题做...好吧,这是第一道算法题 ...