Aleksander L.

asked • 02/04/21

Need help with some questions

What's a method that will take an int array list and will take every even number in the list and insert the same number to the right of the initial number. e.g.: [1,2,3,4] would become [1,2,2,3,4,4]


What's a method that will take an array list and move all the odd numbers to be before the even numbers. e.g.: [1,2,3,4] would become [1,3,2,4]


What's a method that will take an array list and square all the numbers in the list. e.g.:[1,2,3,4] would become [1,4,9,16]



Patrick B.

You did NOT specify the programming language
Report

02/04/21

2 Answers By Expert Tutors

By:

Patrick B. answered • 02/04/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.