Back to problems

Square and Reverse a List

Algorithm · Citadel · Easy

Square and Reverse Easy · Topics · Company Tags · Hints Implement a function named square_and_reverse(nums). It accepts a list of integers and returns a new list where every element is squared and the order is the reverse of the original list. The original list must remain unchanged. The first line of input holds one integer n. The next line contains n space-separated integers. When n is 0, this line may be blank. Print one line containing the result values, separated by…

Checking your access…