无分类 PAT A1045 动态规划 第一种方法对于该题目其实有点取巧的感觉;首先,注意一点,对于最长不下降子序列来说,其序列的元素一定是非递减的,所以我们的当务之急是如何将值转换为递增序列,从而使得算法能够继续进行;对于这个问题,我…
无分类 动态规划初步学习及理解 最近又看到一篇文章,说到算法对前端的重要性,遂抽出时间(玩的时间),逼着自己看一些相关的知识,当看到动态规划相关文献时,也勾起了很大的兴趣,学习各位大神的博客,有了初步理解,借此记载,可能比较浅显,对于同样初…
无分类 leetcode讲解–647. Palindromic Substrings Given a string, your task is to count how many palindromic substrings in this string.
无分类 leetcode讲解–877. Stone Game Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i].