Skip to content

Fet : Enhance UniquePaths problem in DP #4369

Closed
@Manan-09

Description

@Manan-09

What would you like to Propose?

Regarding Uniquepaths
We should generalised the implementation, instead of checking if answer is correct or not , it should return the correct answer. We can write testcases separately to check if program is working correctly or not.

Time complexity mentioned in comments for first approach is wrong , its mentioned O(n) but it will be O(n*m)

Instead of directly making DP of n , we can create DP of size n or m , whatever is smaller

Issue details

Current implementation checks if DP table finds the answer correctly or not, I think it should be generalised implementation which just gives answer rather checking the answer.

Time complexity mentioned in comments for first approach is wrong , its mentioned O(n) but it will be O(n*m)

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions