rafi007akhtar / tcs-digital-prep

Programs I solved during the two weeks while I was preparing for TCS Digital.
MIT License
117 stars 39 forks source link

the 135 question's solution is wrong #2

Open Madhavtib opened 3 years ago

Madhavtib commented 3 years ago

for n=7 the valid combinations are: 1+1+1+1+1+1+1 1+1+5 5+1+1 1+5+1 1+3+3 3+1+3 3+3+1 1+1+1+1+3 1+1+1+3+1 1+1+3+1+1 1+3+1+1+1 3+1+1+1+1

so 12 ways in total

rafi007akhtar commented 3 years ago

Quite right. My day to day activities do not allow me to venture into competitive coding anymore, unfortunately. If you happen to code a more correct solution, do raise a PR.