留学生程序代写,留学生编程代写协助留学生完成优质作业,java,c

了解具体内容请查看网址(内附微信联系方式): http://daixie.baiweitianjiao.com

最近代写更新:

The goal of this project is to determine whether or not a “pile” of sticks can be picked up in some order while only picking up sticks that are not “below” another stick; AND, if they can be picked up, to report an order in which they can be picked up.

You are given test files that have the following format: the first line contains two integers M and N, each between 1 and 1000, inclusive. M is the number of sticks in the test case; sticks are numbered 1 to M. N is the number of lines that follow, each line will correspond to some stick being on top of another stick. Each of the N lines after the first line will contain two integers a and b; indicating that stick a is “on top” of stick b. There will never be two rows in the file containing both (a b) and (b a).

Sample test file:

32 12 23

The rules are simple: A stick can only be picked up if there is no stick on top of it.

Part 1: Write a Java program that will: - Read a test data file.

- Determine:

o Is there a solution? Can all the sticks be picked up in some order that does not violate the rule(s). Print the message “IMPOSSIBLE” if there is no solution.

o IfthereisasolutionprintanaffirmativemessageandthenprintasequenceofstickIDsthatis a legal sequence for picking up the sticks.

Part 2: Create a report up to 1 page in length containing:

o A description of the data structure(s) and algorithm(s) you used to complete the project.

o A description of why you chose these data structure(s) and algorithm(s).

o Big-O complexity analysis of each of the algorithms used. Use M and/or N as described above

in your complexity measures.

Test Cases

See SakaiResourcesProject 4 files

Your code will be reviewed on your AWS VM, you do not need to upload it to Sakai Submit your report as a PDF file by uploading it as an assignment through Sakai.

你可能感兴趣的:(留学生程序代写,留学生编程代写协助留学生完成优质作业,java,c)