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 ...