All Questions
Tagged with memoization c#
3 questions
2
votes
2
answers
216
views
Knapsack performance issue
I'm solving a knapsack problem here. It works, but gives time limit exceeds on a certain test case.
Problem statement
There are N
items, numbered 1,2,…,N. For each i (1≤i≤N), Item i has a weight of ...
6
votes
2
answers
305
views
Thread-Safe Garbage Collectible Memoizer
I am working on a little thread-safe, garbage collectible memoizer for Funcs in C#.
The goals:
Make it easy to Memoize deterministic functions.
Make sure invocation of a memoized Func with a given ...
2
votes
0
answers
611
views
Leetcode 10: Regular Expression Matching
Problem statement
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching ...