Daily byte....minimum jumps

Can you tell me a way to do it in less than o(n^2)

your headline is daily bytes minimum jumps but you tagged cpp-recursion-phone-keypad,
which question are you really asking ???

daily byte …minimum jump wala

please send me the link to the problem

ok i got the question , see here answer of one index is dependent on all the previous indexes therefore we need to check all the previous indexes, so the complexity will be O(n^2)…but if you have a good approach then we can discuss it here

lik ex : 1 2 3 2 0 0 1 2

So in the above one if i move to 3 … then i will be trapped…

sorry , if i move from (indexes) 0, 1 ,3…then i willl be trapped, so we need to look for such conditions too ? or these wont exist…And also will the output to 1 2 2 1 0 0 0 2 == 0??

that wont exist , otherwise it would have been given in the question that print -1 if it is not possible .
so these conditions wont exist

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.