Assessment 4: Nested Loops and 2D arrays


Instructions

This assessment is designed to be completed in fifty minutes or less. Your code must work on any valid inputs to receive credit.

Complete the template below such that you will provide code to solve the following problem. When you are satisfied with your solution, you should upload your solution, you should upload it to Blackboard. Each assessment comes with test cases that you can run before submitting your assignment, so you know how you're doing on it.

Write code that takes a two dimensional list of integers of at least size two from the user, and finds the minimum and next minimum integer in this two dimensional list. We will guarantee all numbers in the list are unique. Return the two numbers as an array; for example, if the user enters [[2,3][1,4]] you would return [1,2]. Please do not use any Java code or libraries that we have not covered in class; this defeats the purpose of the assessment.

Code Template and Test cases

Download the code template.