There is an array A consisting of N two-digit numbers. You can choose any number from the array and replace it with its
Posted: Tue Jul 05, 2022 10:26 am
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:
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: