You are not logged in. Please login at www.codechef.com to post your questions!

×

# CHEF AND DIGIT JUMP JUNE 2014 CHALLENGE ??

 0 I AM A BEGINNER.PLEASE EXPLAIN ME SOLUTION OF THIS PROBLEM "CHEF AND DIGIT JUMP JUNE 2014". WHAT APPROACH IS USED AND WHICH TYPE OF ALGORITHM CAN USED TO SOLVE THESE TYPE OF PROBLEM. asked 16 Jun '14, 22:28 1●2●3 accept rate: 0%

 3 you can look at this EDITORIAL for detailed explanation and algorithm used to solve the problem and you cam look at editorials for any contest problem you want but before looking at editorials i suggest you to try the problem as many times as you can because it will increase your thinking level in solving problem and optimizing levels. :p answered 16 Jun '14, 22:38 3★nanda19 825●3●6●18 accept rate: 7%
 1 you will have to think this problem from graph point of view where there are edges from an index to another where one can jump (here to i-1,i+1 and all points having same value as that of arr[i]). after this you have to find shortest path from index 0 to n-1. This can be done by djikstra but since all edge weights are 1 you can perform bfs traversal. answered 16 Jun '14, 22:36 787●9●15●28 accept rate: 6%
 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,664
×966
×690
×558
×10

question asked: 16 Jun '14, 22:28

question was seen: 4,457 times

last updated: 16 Jun '14, 22:38