Algorithm · Salesforce · Easy
You are given an integer array numbers and two indices l and r. Let n = numbers.length; it is guaranteed that $$0 \le l \le r < n$$. Consider the subarray from index l through index r inclusive, using 0-based indexing. Return how many elements in that subarray have a decimal representation with no repeated digit: every digit occurs at most once. Example 1: Explanation: The subarray [12, 3, 45, 66, 7] contains four numbers with distinct digits; 66 is excluded because 6…
Checking your access…