摘要:
Give a s, need to check every substring whether it is a palindrome or not. Brute Force T: O(n ^3) 我们利用如果s[start] == s[end], 则只需要判断s[start + 1][end - 1 阅读全文
阅读排行榜
[LintCode] 395. Coins in a Line 2_Medium tag: Dynamic Programming, 博弈
2018-07-26 00:34 by Johnson_强生仔仔, 333 阅读, 收藏,
摘要:
Description There are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more c 阅读全文
[LintCode] 394. Coins in a Line_ Medium tag:Dynamic Programming_博弈
2018-07-25 23:16 by Johnson_强生仔仔, 333 阅读, 收藏,
摘要:
Description There are n coins in a line. Two players take turns to take one or two coins from right side until there are no more coins left. The playe 阅读全文
[LeetCode] 840. Magic Squares In Grid_Easy
2018-08-28 12:02 by Johnson_强生仔仔, 332 阅读, 收藏,
摘要:
A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum. Gi 阅读全文
[LeetCode] 53. Maximum Subarray_Easy tag: Dynamic Programming
2018-08-02 04:39 by Johnson_强生仔仔, 332 阅读, 收藏,
摘要:
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: 3.2) 阅读全文
浙公网安备 33010602011771号