算法题
Eswai
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode: 445. Add Two Numbers II 单链表加法
445. Add Two Numbers IIProblem descriptionYou are given two linked lists representing two non-negative numbers. The most significant digit comes first and each of their nodes contain a single digit. Ad原创 2016-10-30 01:57:41 · 1698 阅读 · 0 评论 -
Leetcode: 26. Remove Duplicates from Sorted Array
LeetCode: 26. Remove Duplicates from Sorted Array 删除有序数组中的重复元素问题描述Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate原创 2016-11-03 20:58:42 · 370 阅读 · 0 评论 -
Leetcode: 441. Arranging Coins
Leetcode: 441. Arranging Coins排列硬币问题描述You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins.Given n, find the total number of full stair原创 2016-11-28 15:55:01 · 483 阅读 · 0 评论 -
Leetcode: 15. 3Sum 三数之和
Leetcode: 15. 3Sum 三数之和问题描述Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set m原创 2017-01-05 13:33:28 · 2703 阅读 · 2 评论 -
Leetcode: 18. 4Sum 四数之和
Leetcode: 18. 4Sum 四数之和问题描述Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of targe原创 2017-01-05 16:10:29 · 1022 阅读 · 0 评论 -
Leetcode: 309. Best Time to Buy and Sell Stock with Cooldown 有冷却机制的最优炒股问题
Leetcode: 309. Best Time to Buy and Sell Stock with Cooldown 有冷却机制的炒股问题-作者: Eswai (eswai@foxmail.com) 利用有限状态自动机解决。原创 2017-01-12 19:25:42 · 432 阅读 · 0 评论 -
LeetCode: 49. Group Anagrams 对颠倒字符串分组
Leetcode: 49. Group Anagrams 对颠倒字符串分组作者: Eswai (eswai@foxmail.com) 优快云: blog.youkuaiyun.com/eswai问题描述Given an array of strings, group anagrams together.Example:, Given: [“eat”, “tea”, “tan”, “ate”, “na原创 2017-02-20 15:51:10 · 498 阅读 · 0 评论 -
笔试题:2017.9.10爱奇艺校招编程题【平方串】解题思路
问题描述 平方串: 形如string s = T + T的字符串 目标: 对于字符串s,除去若干字符使其成为平方串,求该平方串的最大长度。 思路与实现将s分成两半,求两个子串的最大子序列长度(longest common subsequence)的最大值ans,最长平方串长度就是2*ans。const int MAXN = 50; int c[MAXN][MAXN] = { 0 }; // s原创 2017-09-16 02:19:24 · 1441 阅读 · 0 评论
分享