Please Help..

Правка en1, от ramJha, 2021-09-12 09:57:23

You are given 'N' stairs and f,p,u,d where f=final postion to reach; p=initial position u=steps jump in forward direction; d=steps jump in backward direction; and cant go ouside the N stairs find the min steps required to reach from 'p' to 'f';

Ex: n=8 f=1 p=6 u=2 d=1

ans=4

explanation:

1->3->5->4->6

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ramJha 2021-09-12 09:57:23 389 Initial revision (published)