https://blog.csdn.net/weixin_54884881/article/details/121140623 ...
一 字符串中的最大回文串 第 题 Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis . Example: Example: . 我的解法 accepted : 中心扩展 思路: 回文即代表有中心,一次遍历中,对于每个位置上的数字求一下最大 ...
2017-12-28 18:39 0 1258 推荐指数:
https://blog.csdn.net/weixin_54884881/article/details/121140623 ...
1. Two Sum 两数之和 来源:力扣(LeetCode) 题目:给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。 示例: 给定 nums = [2, 7, 11, 15], target ...
注:借鉴了 http://m.blog.csdn.net/blog/lsg32/18712353 在Github上提供leetcode有: 1、https://github.com/soulmachine/leetcode https://github.com/soulmachine ...
题目都是来自leetcode,答主使用c++语言完成,其实包括楼主自己的感想,以及会参考多种版本,分析其中的不同 最主要的目的还是楼主自己温故知识,如果能对读者有所作用的话那更是很开心的事情。 博主是语言的初学者已经算法的初学者,希望能互相学习 53. 最大子序和 题目描述:给定一个整数 ...
一、数组 8) 双指针 ---- 滑动窗口 例题: 3. Longest Substring Without Repeating Characters 描述:Given a strin ...
一、滑动窗口题型模板 /* * 滑动窗口类型: 模板 */ public List<Integer> slideWindowMode(String s, ...
根据这个贴: Please Share dijkstra's algorithm questions Graph - Dijkstra's4926 views The Maze III T ...
持续更新。。。 github链接:https://github.com/x2mercy/Leetcode_Solution 今天第一次遇到贪心算法。 基本思路来自百度百科 贪心算法参考:http://blog.csdn.net/qq_32400847/article ...