2019年7月26日

Longest Substring Without Repeating Characters

摘要:Longest Substring Without Repeating Characters leetcode Medium Given a string, find the length of the longest substringwithout repeating characters. E 阅读全文

posted @ 2019-07-26 11:47 Algorithm_Ethusiast 阅读(49) 评论(0) 推荐(0) 编辑

2019年7月14日

计算机操作系统巡回置换算法

摘要:令P[1 : n]为1到n(n>1)的整数置换。 设i=1,2,3,4,5,6,7 P[i] = {4,7,3,2,1,5,6},描述P[i]的巡回置换算法。 代码: 为方便观察,多了几步输出。 阅读全文

posted @ 2019-07-14 22:00 Algorithm_Ethusiast 阅读(1115) 评论(0) 推荐(0) 编辑

HDU 2041 DP

摘要:URL:https://vjudge.net/problem/HDU-2041 简单DP,因为每次只能走1或者2阶,所以当走到第i阶的时候(i>=4),那么它的前一种状态只可能是i-1和i-2,所以状态方程为: DP[2] = 1; DP[3] = 2; DP[i] = DP[i-1] + DP[i 阅读全文

posted @ 2019-07-14 17:02 Algorithm_Ethusiast 阅读(81) 评论(0) 推荐(0) 编辑

HDU 2044 DP (fibonacci)

摘要:HDU 2044 https://vjudge.net/problem/HDU-2044 每一个只有可能由它左面的以及左上的状态变过来,也就是F(i-1)和F(i-2) F(1) = 1 F(2) = 2 F(i) = F(i-1) + F(i-2) (i>=3) AC 代码: 阅读全文

posted @ 2019-07-14 16:50 Algorithm_Ethusiast 阅读(49) 评论(0) 推荐(0) 编辑

HDU 2018 Cow Story DP

摘要:Basic DP Problem URL:https://vjudge.net/problem/HDU-2018 Describe: There is a cow that gives birth to a heifer every year.Every heifer starts in the f 阅读全文

posted @ 2019-07-14 12:02 Algorithm_Ethusiast 阅读(118) 评论(0) 推荐(0) 编辑

HDU 2084 DP

摘要:HDU 2084:https://vjudge.net/problem/HDU-2084 Problem Describe : When it comes to the DP algorithm, a classic example is the tower problem, which is de 阅读全文

posted @ 2019-07-14 11:24 Algorithm_Ethusiast 阅读(112) 评论(0) 推荐(0) 编辑

2019年7月13日

leetcode 141 Linked List Cycle Hash fast and slow pointer

摘要:Problem describe:https://leetcode.com/problems/linked-list-cycle/ Ac Code: (Hash) Fast and Slow Pointer 阅读全文

posted @ 2019-07-13 19:18 Algorithm_Ethusiast 阅读(40) 评论(0) 推荐(0) 编辑

leetcode 136 Single Number bit Option

摘要:Linked Url:https://leetcode.com/problems/single-number/ Given a non-empty array of integers, every element appears twice except for one. Find that sin 阅读全文

posted @ 2019-07-13 18:49 Algorithm_Ethusiast 阅读(81) 评论(0) 推荐(0) 编辑

lleetcode 1 two sum c++

摘要:Problem describe:https://leetcode.com/problems/two-sum/ Given an array of integers, return indices of the two numbers such that they add up to a speci 阅读全文

posted @ 2019-07-13 18:32 Algorithm_Ethusiast 阅读(82) 评论(0) 推荐(0) 编辑

2019年7月7日

Leetcode 195 Tenth Line

摘要:Given a text file file.txt, print just the 10th line of the file. Example: Assume that file.txt has the following content: Your script should output t 阅读全文

posted @ 2019-07-07 11:36 Algorithm_Ethusiast 阅读(95) 评论(0) 推荐(0) 编辑

导航

统计