<![CDATA[CodeGuru Forums - Algorithms & Data Structures]]>
http://forums.codeguru.com/
enTue, 04 Aug 2015 14:44:40 GMTvBulletin60http://forums.codeguru.com/images/misc/rss.png<![CDATA[CodeGuru Forums - Algorithms & Data Structures]]>
http://forums.codeguru.com/
Algorithm for simple board game
http://forums.codeguru.com/showthread.php?551343-Algorithm-for-simple-board-game&goto=newpost
Sun, 26 Jul 2015 08:56:55 GMTWe have N coins of type-1 and M coins of type-2. A game-board has N squares of type-1 and M squares of type-2. In this game we must place one coin into each square. After placing all coins we will get a score based on our coin placement strategy .
If type-1 square contains a type-1 coin then we will get A points, if type-2 square contains a type-2 coin then we will get B points and in all other cases, we will get C points.Our total game score will be sum of scores of all squares.
Inputs Available are ( N,M,A,B,C )
How can we maximize our score ?We have N coins of type-1 and M coins of type-2. A game-board has N squares of type-1 and M squares of type-2. In this game we must place one coin into each square. After placing all coins we will get a score based on our coin placement strategy .

If type-1 square contains a type-1 coin then we will get A points, if type-2 square contains a type-2 coin then we will get B points and in all other cases, we will get C points.Our total game score will be sum of scores of all squares.

Inputs Available are ( N,M,A,B,C )

How can we maximize our score ?
]]>aakashjsrhttp://forums.codeguru.com/showthread.php?551343-Algorithm-for-simple-board-gameColor quantization
http://forums.codeguru.com/showthread.php?551243-Color-quantization&goto=newpost
Tue, 14 Jul 2015 09:04:43 GMTWhich algorithm is best, which is fastest? Especially I think about Java implementation.Which algorithm is best, which is fastest? Especially I think about Java implementation.
]]>Borneqhttp://forums.codeguru.com/showthread.php?551243-Color-quantizationdepth first search problem
http://forums.codeguru.com/showthread.php?551221-depth-first-search-problem&goto=newpost
Sat, 11 Jul 2015 15:54:48 GMThey,
I have a graph and a vertex s, and i want to run DFS on it, but the thing is that i don't want to start from a random vertex.
I want to start the DFS from a vertex such that the DFS gives me the most finishing time for vertex s as possible. finishing time: every vertex after running DFS on the graph has a starting time d(v) and finishing time f(v).
i want the algorthim to be linear (|V|+|E|)!
]]>meme23http://forums.codeguru.com/showthread.php?551221-depth-first-search-problem