Find Jobs
Hire Freelancers

Data Structures Homework

$30-5000 USD

Completed
Posted over 20 years ago

$30-5000 USD

Paid on delivery
You are given an (n x n) chessboard and you start at your location of choice (removing confusing statement) on the first row. You have to find the optimal (least-cost) path from the top of the chessboard to the bottom. cost[i][j] represents the cost of moving onto square (i,j) of the chessboard. You move down one row at each step along your path. You may move to the square immediately below you or the squares diagonally below you. That is, when you on square (i,j), you can move down to either (i+1,j), (i+1,j-1), or (i+1,j+1). Your method optimalPath() should use dynamic programming to solve this problem. Define your recurrence equation g(i,j) (which you should represent by an int[][] in your method) to be the cost of the optimal path from the first row to location (i,j). / \ c(i,j) if i = 0 (base case, first row) g(i,j) = < / <figure this part out> if i > 0 (recursive case, depends on row (i-1)) \ PLEASE NOTE: The ArrayLinearList containts the column numbers of the path. For the example above, the resulting ArrayLinearList will contain [2, 1, 1, 2, 3]. Use the following program shell: package dataStructures; class OptimalPath { public static ArrayLinearList optimalPath(int n, int [][]cost) { } // create helper methods if you need } ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. ## Platform Java
Project ID: 3026476

About the project

6 proposals
Remote project
Active 20 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$10 USD in 3 days
4.9 (195 reviews)
5.7
5.7
6 freelancers are bidding on average $29 USD for this job
User Avatar
See private message.
$22.95 USD in 3 days
4.9 (48 reviews)
3.8
3.8
User Avatar
See private message.
$85 USD in 3 days
4.7 (15 reviews)
3.8
3.8
User Avatar
See private message.
$17 USD in 3 days
5.0 (9 reviews)
3.4
3.4
User Avatar
See private message.
$29.75 USD in 3 days
3.8 (4 reviews)
2.3
2.3
User Avatar
See private message.
$8.50 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
3
Member since Dec 4, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.