python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to optimize with a function that decreases with time but increases with n?
There are slices of cake where the consumer gets a utility value log(1 + j)beta^(t - 1) value from it where j is the number of slices consumed each day and t is the number of days since t = 1. What wo...
Arron Starmer
Votes: 0
Answers: 1
Choosing k vertices from binary tree vertices set such that sum of cost edges in this new k vertices subset is minimum
Given a binary tree T with a weight function on its edge set w : E -> Z
(Note the weight can be negative too) and a positive integer k. For
a subset T' of V (T), cost(T') is defined as the sum of t...
Sagar
Votes: 0
Answers: 1
Maximum sum path from top left to bottom right in a grid using dynamic programming
So I have a n by n grid with 0 at the top left, grid[0][0] marking the start position, and a 0 at the bottom right, grid[n-1][n-1] marking the end position.
The rest of the grid is filled with random ...
Turkey
Votes: 0
Answers: 1
Not able to Memoize this Recursive Code into Top Down DP
I got this problem on one of my tests. I wrote a Recursive solution for it (I tried it on a few test cases, it seems to be working fine). I am trying to memoize this code, but am not able to do that.
...
kunal
Votes: 0
Answers: 1