Skip to main content

All Questions

Tagged with
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 ...
Youssef13's user avatar
  • 167
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 ...
bopapa_1979's user avatar
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 ...
Jianmin Chen's user avatar
  • 2,416