There is an array A consisting of N two-digit numbers. You canchoose any number from the array and replace it with its reversedversion. You can apply this operation as many times as you want.What is the maximum number of distinct numbers that can becreated?
In python 3!!
Write a function:
class Solution { public static int solution(int[] A);}
that, given an array of N integers, returns the maximum numberof distinct numbers that can be represented after reversing theorder of any number of integers.
Examples:
Assumptions:
There is an array A consisting of N two-digit numbers. You can choose any number from the array and replace it with its
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am