Computers and Technology

In C++ programming languageJump GameGoalsPractice getting input from the command lineReview solving problems with recursionMatthew’s StatsTime taken: 40 minutesFiles: 3Lines of Code: 116 including whitespace and commentsRestrictions and RequirementsNo global variables may be usedYour submission must contain at least 2 or more .cpp files and one or more .h filesProblem DescriptionYou are given a list of integer numbers. Each number tells you how far to the right or left you can move from that spot. You can only move exactly that many spaces. Moving from one number to the next is considered a move. Your goal is to find the sequence of moves that get you from the first number to the last number in the fewest moves possible. If however, there is no sequence of moves that will get you to the end, then you should state that. For example, if you were given the listIndex0123456Value1241117Then the smallest sequence of moves that gets you from index 0 to index 6 is {0, 1, 3, 2, 6}.InputCommand Line ArgumentsWill always be validThe list of integers to solveEach integer will have a value greater than or equal to 0Standard will find recursion to be very helpful in solving this problem. When solving the problem, first go to the left and then go rightThis will help us to have the same solution if there are multiple equally valid solutionsIf a move would take you out of bounds of the list, for example, before the first entry or after the last entry, it is invalid and should not be takenExamplesExample 1./JumpGame 1 2 4 1 1 1 7 The solution is: {0, 1, 3, 2, 6}Example 2./JumpGameThere is no solution to the given game. What to SubmitA zip file containingThe .cpp and .h files that make up your solutionA CMakeLists. txt file that will generate an executable named JumpGame from your .cpp and .h filesMake sure to zip the files you want to submit and NOT the folder that contains the files. Submitting the folder with the files will cause your program to fail to build.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:00, adrianaglass12
Which virus-infecting components are email messages prone to carry? one of the problems associated with the use of email communication is that email messages are prone to carry virus-infecting .
Answers: 3
image
Computers and Technology, 22.06.2019 16:10, katherineweightman
When copying and pasting text, the first step is move your cursor type the text select the copy command select the paste command
Answers: 2
image
Computers and Technology, 22.06.2019 16:30, sayedaly2096
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
image
Computers and Technology, 22.06.2019 20:30, fickllyd000
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
Do you know the correct answer?
In C++ programming languageJump GameGoalsPractice getting input from the command lineReview solving...

Questions in other subjects:

Konu
Mathematics, 18.09.2020 06:01
Konu
English, 18.09.2020 06:01
Konu
Mathematics, 18.09.2020 06:01
Konu
Chemistry, 18.09.2020 06:01
Konu
Mathematics, 18.09.2020 06:01
Konu
Mathematics, 18.09.2020 06:01
Konu
English, 18.09.2020 06:01
Konu
Mathematics, 18.09.2020 06:01
Konu
English, 18.09.2020 06:01
Konu
Mathematics, 18.09.2020 06:01