E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
geeksforgeeks
DP34 流水线调度问题 Assembly Line Scheduling @
geeksforgeeks
Acarfactoryhastwoassemblylines,eachwithnstations.AstationisdenotedbySi,j whereiiseither1or2andindicatestheassemblylinethestationison,andjindicatesthenumberofthestation. Thetimetakenperstationisdenoted
hellobinfeng
·
2013-12-30 05:00
DP33 两个字符串交叉得到的字符串 Find if a string is interleaved of two other strings @
geeksforgeeks
GiventhreestringsA,BandC.WriteafunctionthatcheckswhetherCisaninterleavingofAandB. CissaidtobeinterleavingAandB,ifitcontainsallcharactersofAandBandorderofallcharactersinindividualstringsispreserved.Weh
hellobinfeng
·
2013-12-30 03:00
DP32 单词按照字典分割问题 Word Break Problem @
geeksforgeeks
Givenaninputstringandadictionaryofwords,findoutiftheinputstringcanbesegmentedintoaspace-separatedsequenceofdictionarywords.Seefollowingexamplesformoredetails.ThisisafamousGoogleinterviewquestion,alsob
hellobinfeng
·
2013-12-30 01:00
DP31 取大小游戏中的最优策略(附:如何对DP[0][n]进行对角线递推) Optimal Strategy for a Game @
geeksforgeeks
Problemstatement:Considerarowofncoinsofvaluesv1...vn,whereniseven.Weplayagameagainstanopponentbyalternatingturns.Ineachturn,aplayerselectseitherthefirstorlastcoinfromtherow, removesitfromtherowpermane
hellobinfeng
·
2013-12-29 13:00
DP30 求骰子能凑成给定和的组合数 Dice Throw @
geeksforgeeks
Givenndiceeachwithmfaces,numberedfrom1tom,findthenumberofwaystogetsumX.Xisthesummationofvaluesoneachfacewhenallthedicearethrown.The Naiveapproach istofindallthepossiblecombinationsofvaluesfromndiceand
hellobinfeng
·
2013-12-29 04:00
DP29 最长相同子串 Longest Common Substring @
geeksforgeeks
Giventwostrings‘X’and‘Y’,findthelengthofthelongestcommonsubstring.Forexample,ifthegivenstringsare“
GeeksforGeeks
hellobinfeng
·
2013-12-29 03:00
DP28 求能变成回文的最小插入字符个数 Minimum insertions to form a palindrome @
geeksforgeeks
Givenastring,findtheminimumnumberofcharacterstobeinsertedtoconvertittopalindrome.Beforewegofurther,letusunderstandwithfewexamples: ab:Numberofinsertionsrequiredis1. bab aa:Numberofinsertionsrequ
hellobinfeng
·
2013-12-29 02:00
DP27 2D矩阵中最大的矩形和 Maximum sum rectangle in a 2D matrix @
geeksforgeeks
Givena2Darray,findthemaximumsumsubarrayinit.Forexample,inthefollowing2Darray,themaximumsumsubarrayishighlightedwithbluerectangleandsumofthissubarrayis29.Thisproblemismainlyanextensionof LargestSumCont
hellobinfeng
·
2013-12-29 01:00
DP26树的最大独立子集问题 Largest Independent Set Problem @
geeksforgeeks
GivenaBinaryTree,findsizeofthe Largest Independent Set(LIS)init.Asubsetofalltreenodesisanindependentsetifthereisnoedgebetweenanytwonodesofthesubset.Forexample,considerthefollowingbinarytree.Thelargest
hellobinfeng
·
2013-12-29 00:00
DP25 子集和问题 Subset Sum Problem @
geeksforgeeks
同分割区间问题:http://blog.csdn.net/fightforyourdream/article/details/17602699Givenasetofnon-negativeintegers,andavalue sum,determineifthereisasubsetofthegivensetwithsumequaltogiven sum.Examples:set[]={3,34,
hellobinfeng
·
2013-12-28 06:00
DP24 最优BST Optimal Binary Search Tree @
geeksforgeeks
Givenasortedarray keys[0..n-1] ofsearchkeysandanarray freq[0..n-1] offrequencycounts,wherefreq[i] isthenumberofsearchesto keys[i].Constructabinarysearchtreeofallkeyssuchthatthetotalcostofallthesearche
hellobinfeng
·
2013-12-28 06:00
DP23 Bellman–Ford Algorithm @
geeksforgeeks
Givenagraphandasourcevertex src ingraph,findshortestpathsfrom src toallverticesinthegivengraph.Thegraphmaycontainnegativeweightedges.Wehavediscussed Dijkstra’salgorithm forthisproblem.Dijksra’salgorit
hellobinfeng
·
2013-12-28 04:00
DP22 堆盒子问题 Box Stacking Problem @
geeksforgeeks
Youaregivenasetofntypesofrectangular3-Dboxes,wherethei^thboxhasheighth(i),widthw(i)anddepthd(i)(allrealnumbers).Youwanttocreateastackofboxeswhichisastallaspossible,butyoucanonlystackaboxontopofanother
hellobinfeng
·
2013-12-28 03:00
DP21 LIS的变种问题-建桥问题 Variations of LIS-Building Bridge @
geeksforgeeks
WehavediscussedDynamicProgrammingsolutionforLongestIncreasingSubsequenceprobleminthis postandaO(nLogn)solutionin this post. Followingarecommonlyaskedvariationsofthestandard LISproblem.1.BuildingBridge
hellobinfeng
·
2013-12-28 02:00
DP19 自动换行问题 Word Wrap Problem @
geeksforgeeks
挺复杂的一题,用了多个dp数组来保存过程量Givenasequenceofwords,andalimitonthenumberofcharactersthatcanbeputinoneline(linewidth).Putlinebreaksinthegivensequencesuchthatthelinesareprintedneatly. Assumethatthelengthofeachwo
hellobinfeng
·
2013-12-27 07:00
DP18 分割区间问题 Partition problem @
geeksforgeeks
思路:把能否划分区间的问题转化为能不能找到一个使得和为总和的一半的子区间,然后转为01背包问题,分析每一个元素是否取Partitionproblemistodeterminewhetheragivensetcanbepartitionedintotwosubsetssuchthatthesumofelementsinbothsubsetsissame.Examplesarr[]={1,5,11,5
hellobinfeng
·
2013-12-27 04:00
DP17 最少回文切割次数 Palindrome Partitioning @
geeksforgeeks
Givenastring,apartitioningofthestringisa palindromepartitioning ifeverysubstringofthepartitionisapalindrome. Forexample,“aba|b|bbabb|a|b|aba”isapalindromepartitioningof“ababbbabbababa”.Determinethefew
hellobinfeng
·
2013-12-27 03:00
DP16 Floyd Warshall Algorithm @
geeksforgeeks
The FloydWarshallAlgorithm isforsolvingtheAllPairsShortestPathproblem.TheproblemistofindshortestdistancesbetweeneverypairofverticesinagivenedgeweighteddirectedGraph.Example:Input: graph[][]={{0,5,INF,
hellobinfeng
·
2013-12-27 03:00
DP11 高楼扔鸡蛋问题 Egg Dropping Puzzle @
geeksforgeeks
packageDP; /** *100层楼,两个鸡蛋。某层之上扔鸡蛋就会碎。问至少要测试多少次才能找出这层楼来 *我们可以决定怎么扔(min),但必须假设我们的运气最差(max) * *100层楼,两个鸡蛋。某层之上扔鸡蛋就会碎。问至少要测试多少次才能找出这层楼来? 思路: 首先要理解清楚题意,本题不是要找在哪一层以上会把鸡蛋扔破!而是我们假设在W层以上会把鸡蛋仍破,现在问至少要测试Y次才能
hellobinfeng
·
2013-12-26 02:00
DP10 0-1背包问题 0-1 Knapsack Problem @
geeksforgeeks
01背包问题的取和不取实际上就是一个机会成本的问题,如果取了某件东西,尽管当前的价值暂时地增加了,但你付出了机会成本。因为如果不取,留下的空间以后说不定可以放更有价值的东西。因此空间和价值总是一对矛盾。我们的目的是要用有限的空间装入最优价值的东西。Givenweightsandvaluesofnitems,puttheseitemsinaknapsackofcapacityWtogetthemax
hellobinfeng
·
2013-12-25 06:00
DP9 二项式系数 Binomial Coefficient @
geeksforgeeks
Followingarecommondefinitionof BinomialCoefficients.1)A binomialcoefficient C(n,k)canbedefinedasthecoefficientofX^kintheexpansionof(1+X)^n.2)AbinomialcoefficientC(n,k)alsogivesthenumberofways,disregar
hellobinfeng
·
2013-12-25 05:00
DP8 矩阵链相乘 Matrix Chain Multiplication @
geeksforgeeks
思路是在矩阵链的每一个地方分别分开,然后找最小Givenasequenceofmatrices,findthemostefficientwaytomultiplythesematricestogether. Theproblemisnotactuallytoperformthemultiplications,butmerelytodecideinwhichordertoperformthemult
hellobinfeng
·
2013-12-25 05:00
DP7 两道换硬币的问题 Coin Change @
geeksforgeeks
1 GivenavalueN,ifwewanttomakechangeforNcents, andwehaveinfinitesupplyofeachofS={S1,S2,..,Sm}valuedcoins, howmanywayscanwemakethechange?Theorderofcoinsdoesn’tmatter.两种思路:1)http://www.cs.ucf.edu/~dmarin
hellobinfeng
·
2013-12-25 04:00
DP6 最小路径花费 Min Cost Path @
geeksforgeeks
DynamicProgramming|Set6(MinCostPath)Givenacostmatrixcost[][]andaposition(m,n)incost[][],writeafunctionthatreturnscostofminimumcostpathtoreach(m,n)from(0,0).Eachcellofthematrixrepresentsacosttotraverse
hellobinfeng
·
2013-12-24 02:00
DP5 编辑距离 Edit Distance @
geeksforgeeks
Problem: Giventwostringsofsizem,nandsetofoperationsreplace(R),insert(I)anddelete(D)allatequalcost.Findminimumnumberofedits(operations)requiredtoconvertonestringintoanother.IdentifyingRecursiveMethods:
hellobinfeng
·
2013-12-24 01:00
DP4 最长公共子序列 LCS @
geeksforgeeks
LCSProblemStatement: Giventwosequences,findthelengthoflongestsubsequencepresentinbothofthem.Asubsequenceisasequencethatappearsinthesamerelativeorder,butnotnecessarilycontiguous.Forexample,“abc”,“abg”,
hellobinfeng
·
2013-12-24 00:00
DP3 最长上升子序列 LIS @
geeksforgeeks
LetusdiscussLongestIncreasingSubsequence(LIS)problemasanexampleproblemthatcanbesolvedusingDynamicProgramming.ThelongestIncreasingSubsequence(LIS)problemistofindthelengthofthelongestsubsequenceofagiven
hellobinfeng
·
2013-12-24 00:00
Minimum Window Substring 最小子串窗口@LeetCode
参考了许多资料:http://leetcode.com/2010/11/finding-minimum-window-in-s-which.htmlhttp://www.
geeksforgeeks
.org
hellobinfeng
·
2013-12-17 11:00
DP 学习网站总结
list=PL962BEE1A26238CA3http://saurabhschool.org/index.php/dynamic-programming/DP面试专题http://www.
geeksforgeeks
.org
hellobinfeng
·
2013-10-28 03:00
[
GeeksforGeeks
]Remove all adjacent duplicates
Givenastring,recursivelyremoveadjacentduplicatecharactersfromstring.Theoutputstringshouldnothaveanyadjacentduplicates.Input: azxxzyOutput:ayFirst"azxxzy"isreducedto"azzy".Thestring"azzy"containsduplic
ylide
·
2013-10-17 13:00
String
medium
geeksforgeeks
KMP算法
:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.htmlhttp://www.
geeksforgeeks
.org
wanglongfei_hust
·
2013-08-17 16:00
C程序内存映像 有例子,有测试 memory representation of a C program
http://www.
geeksforgeeks
.org/memory-layout-of-c-program/AtypicalmemoryrepresentationofCprogramconsistsoffollowingsections
YorkCai
·
2013-05-23 00:00
c
memory
Representatio
内存映像
输出所有的最长公共子序列
请先通过维基百科或其他搜索引擎了解如下知识点,如果已经掌握可直接跳过:【参考网址:http://en.wikipedia.org/wiki/Standard_Template_Libraryhttp://www.
geeksforgeeks
.org
YorkCai
·
2013-01-06 20:00
输出所有的最长公共子序列
几个练习编程的网站
http://bit.ly/oUHI4Ghttp://
geeksforgeeks
.org/forum/forum/interview-questionshttp://www.careercup.com/
ee_mc
·
2012-12-22 23:00
编程
荷兰三色旗问题 Dutch national flag problem
算法详解见此网址: http://www.
geeksforgeeks
.org/archives/8133我的C++语言实现#include voidswap(int*a,int*b) { *a=*a+
leo524891010
·
2012-07-04 12:00
上一页
1
2
3
4
5
6
7
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他