All Questions
Tagged with dynamic-programming java
5 questions
1
vote
2
answers
265
views
design problem handling a dynamic object
I am writing an application for different geometrical types of fuel tanks.
I have a design problem that only at runtime I will receive the exact type of tank from the end user; and I don't know how ...
0
votes
1
answer
2k
views
How to find a subset of size k such that the minimum distance between values is maximum
Suppose I have a sorted array which contains n integers.
How do I find subset of size k such that the minimum distance between all pairs of integers in the subset is maximized, I mean they are at ...
3
votes
5
answers
6k
views
Robot in a grid
This was recently asked to someone I know.
A robot has to move in a grid which is in the form of a matrix. It can go to
A(i,j)--> A(i+j,j) (Down)
A(i,j)--> A(i,i+j) (Right)
Given ...
-1
votes
1
answer
284
views
optimise my solution
I just solve this but want know more efficient way to do matrix multiplication
M :
------
1 1 0
0 0 5
3 2 0
f[n] = M^n
I have implemented using Exponentiation_by_squaring
Is there more efficient ...
1
vote
2
answers
131
views
Need to organize words based on their components, any other way aside from brute force?
I'm not sure if this process has a name.
I have some words (about 9,000). They are in Japanese, but I'll try to explain this using English words. I want to categorize the words by the components (in ...