codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
201 stars 267 forks source link

Painting fence Algorithm #385

Closed Srishti013 closed 3 years ago

Srishti013 commented 3 years ago

Description of the problem

Given a fence with n posts and k colors, find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color. It is a dynamic programming problem.

Srishti013 commented 3 years ago

I am a GSSOC participant and I would like to work on this. Please assign it to me if you think its appropriate.

Smit-create commented 3 years ago

https://github.com/codezonediitj/pydatastructs/issues/386#issuecomment-841596873