-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
In the driver program for dynamic_programming/LPSS, there may be an index issue where we should call p.LPSS(0, in.size()); with size-1. The bug isn't detected for LPSS because it returns the correct answer, but is seen when calling LPSS_memo because memo at that index isn't set with constructor, it will always return 0.
int main() {
std::string in = "bbbab";
LPSS_Problem p(in);
auto result = p.LPSS(0, in.size());
Print2dVector(p._memo);
std::cout << "result: " << result << std::endl;
return 0;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels