Purchase Solution

Accessing Array Elements in Reverse Order

Not what you're looking for?

Ask Custom Question

Write the definition of a method, isReverse , whose two parameters are arrays of integers of equal size. The method returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.)

So, suppose you had two int arrays, forward and backward, each with 4 elements. Now suppose that forward had these elements: 1, 2, 3, 4 and that backward had these: values 4, 3, 2, 1.

Then if your isReverse method were invoked, passing it forward and backward, it would return true.

Please explain in detail to aid learning process

Purchase this Solution

Solution Summary

Solution is a Java file ReverseArray.java which demonstrates how to check if an Array is in reverse order of another Array.

Solution Preview

The idea is to check the first element of array A with the last element of array B if they ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic Networking Questions

This quiz consists of some basic networking questions.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.