DemoBrowseAboutTeamLogin Logo

But better.

Write accurate questions faster. Autograde code quality instantly.

Start with the walkthrough below. To learn more, check out the demo or feature overview.

Array Squares Sorted

Geoffrey Challen // 2022.3.0

Create a class SquaredSorter that provides a single class method named maxOfSortedSquares. maxOfSortedSquares accepts an array of ints. If the passed array is null or empty, throw an IllegalArgumentException.

Otherwise, proceed as follows. First, square every value of the array. Next, sort the array in ascending order. Finally, return the maximum of the squared, sorted array. Modify the array in place, and do not create a copy. Sort the array using a helper method from java.util.Arrays.

public class SquaredSorter {
// finish me...
Better Feedback

Provide students with immediate feedback on not just correctness, but also on code quality. Instantly. On every submission.

Better Than Human

Your course staff aren't good at reading code. And it's not a good use of their time. Free them to work directly with students!

Better Questions

Over 500 questions for Java and Kotlin. Designed to support beginners. Ready to integrate into your materials.