Closest Equal Element Queries at Salesforce

Medium32.7% acceptance

This problem has 75.0% frequency at Salesforce.

Problem Description

You are given a **circular** array `nums` and an array `queries`. For each query `i`, you have to find the following: * The **minimum** distance between the element at index `queries[i]` and **any** other index `j` in the **circular** array, where `nums[j] == nums[queries[i]]`. If no such index...

Read full problem and hints

Topics


More Salesforce Questions

View all Salesforce questions