原文:leetcode 算法整理

一 字符串中的最大回文串 第 题 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 推荐指数:

查看详情

LeetCode题库整理(自学整理

1. Two Sum 两数之和 来源:力扣(LeetCode) 题目:给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。 示例: 给定 nums = [2, 7, 11, 15], target ...

Mon Sep 09 18:43:00 CST 2019 0 1592
leetcode资料整理

注:借鉴了 http://m.blog.csdn.net/blog/lsg32/18712353 在Github上提供leetcode有: 1、https://github.com/soulmachine/leetcode https://github.com/soulmachine ...

Thu Jun 04 04:37:00 CST 2015 2 1510
leetcode做题笔记整理

题目都是来自leetcode,答主使用c++语言完成,其实包括楼主自己的感想,以及会参考多种版本,分析其中的不同 最主要的目的还是楼主自己温故知识,如果能对读者有所作用的话那更是很开心的事情。 博主是语言的初学者已经算法的初学者,希望能互相学习 53. 最大子序和 题目描述:给定一个整数 ...

Wed Jul 03 06:17:00 CST 2019 0 402
Leetcode题目分类整理

一、数组 8) 双指针 ---- 滑动窗口 例题: 3. Longest Substring Without Repeating Characters 描述:Given a strin ...

Mon Feb 25 01:53:00 CST 2019 0 652
LeetCode 滑动窗口题型整理

一、滑动窗口题型模板    /* * 滑动窗口类型: 模板 */ public List<Integer> slideWindowMode(String s, ...

Wed Jul 17 04:21:00 CST 2019 0 802
Leetcode中的Dijkstra算法

根据这个贴: Please Share dijkstra's algorithm questions Graph - Dijkstra's4926 views The Maze III T ...

Mon Dec 27 20:55:00 CST 2021 0 961
Leetcode之贪心算法

持续更新。。。 github链接:https://github.com/x2mercy/Leetcode_Solution 今天第一次遇到贪心算法。 基本思路来自百度百科 贪心算法参考:http://blog.csdn.net/qq_32400847/article ...

Mon Dec 04 20:55:00 CST 2017 0 1001
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM