Tap here to switch tabs
Problem
Submissions

Problem: Count Distinct Integers After Reverse Operations

Try to solve the Count Number of Distinct Integers After Reverse Operations problem.

Statement

You are given an array nums of positive integers.

You must take the reverse of the digits of each integer in the array and append it to the end of nums.

Return the total number of distinct integers present in the resulting array.

Note: Reversing an integer removes any leading zeros (for example, reversing 1010 results in 11).

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤106\leq 10^6

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Distinct Integers After Reverse Operations

Try to solve the Count Number of Distinct Integers After Reverse Operations problem.

Statement

You are given an array nums of positive integers.

You must take the reverse of the digits of each integer in the array and append it to the end of nums.

Return the total number of distinct integers present in the resulting array.

Note: Reversing an integer removes any leading zeros (for example, reversing 1010 results in 11).

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤106\leq 10^6