dynamic-programming
Find N number subset in Array that sum to 0 [Subset Sum problem, that returns the subset]
I am trying to practice the interview question in the title For those who directly want to know my question , jump to \"Smaller version of my Question\" .[详细]
2023-03-09 03:36 分类:问答Finding the Longest Palindrome Subsequence with less memory
I am trying to solve a dynamic programming problem from Cormem\'s Introduction to Algorithms 3rd edition (pg 405) which asks the following:[详细]
2023-03-08 20:57 分类:问答Data-structure to "map" collections to states in a dynamic-programming algorithm
I am coding for fun an algorithm to determine the best order of constructing N Building objects. Of course, each Building has its own characteristics (such as a cost, a production, a time of construct[详细]
2023-03-08 19:20 分类:问答Check if given string can be created by a set of characters cut out from magazine article
\"Observe that when you cut a character out of a magazine, the character on the reverse side of the page is also removed. Give an algorithm to determine whether you can generate a given string by past[详细]
2023-03-08 06:46 分类:问答Calculating critical path of a DAG in C++
I\'m doing the calculation of the critical path for the DAG of the image, according to this algorithm for another post.My teacher requires that aarray be implemented, I simplify the homework statement[详细]
2023-03-07 22:42 分类:问答Shortest subsequence with no interval duplicates
Given an unsorted array of N integers and a function getNextIndexOf(int k) that returns the index of the next element whose value is \'k\', how would one get at the last element (i.e., index N) with t[详细]
2023-03-07 00:32 分类:问答False Mirrors. can you help me to solve?
Here is the problem BFG-9000 destroys three adjacent balconies per one shoot. (N-th balcony is adjacent to[详细]
2023-03-06 15:51 分类:问答Pairwise alignment of long string sequences
I want to find the globally optimal (or close to optimal) pairwise alignment between two long (tens of thousands) sequences of strings, but the algorithm is expected to operate on any object sequences[详细]
2023-03-06 10:41 分类:问答Is the ruby Enumerable.Inject method a closure or just a block?
开发者_如何学JAVAI have been trying to understand if you need to create a proc or lambda before something is a closure in Ruby or not.[详细]
2023-03-04 00:08 分类:问答Reduction Algorithm - Recast Any SGI Problem as Subset Sum
Is it possible to cast any subgraph isomorphism problem as a subset sum problem so that it is possible to use dynamic programming techniques av开发者_如何学Goailable for solving the subset sum problem[详细]
2023-03-01 22:10 分类:问答