FastPrepFind Every Duplicated Array Value
Problems/Find Every Duplicated Array Value

Find Every Duplicated Array Value

Expedia logoExpedia● EasyNEW GRADINTERNOAONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: An unrelated index-distance approach accompanies the source. This practice follows the duplicate-value prompt and uses ascending output; source match is about 95%.

Return every value that occurs at least twice in values, with each duplicated value included exactly once.

Return those values in ascending order, or an empty array if none exist. You may modify the input array as working storage; its original contents need not be preserved.

Function

findDuplicates(values: int[]) → List<Integer>

Examples

Example 1

values = [0,3,1,2,3,0]return = [0,3]

Values 0 and 3 each occur twice; list each once.

Example 2

values = [0,1,2]return = []

Each value occurs only once.

Constraints

  • 0 <= values.length <= 100000.
  • 0 <= values[i] <= 99999.
  • Every input value is less than values.length.

More Expedia Onsite Interview questions

  • Scramble StringONSITE INTERVIEW · Seen Sep 2026
  • Smallest Sufficient TeamONSITE INTERVIEW · Seen Sep 2026
  • Check Anagram Pairs Index by IndexONSITE INTERVIEW · Seen Oct 2025
  • Fresh Oranges Left After Rotting StopsONSITE INTERVIEW · Seen Oct 2025
  • Longest Increasing SubsequenceONSITE INTERVIEW · Seen Oct 2025
  • Lowest Common Ancestor with Repeated and Missing ValuesONSITE INTERVIEW · Seen Oct 2025
  • Shortest Substring with Exactly K OnesONSITE INTERVIEW · Seen Oct 2025
  • Middle Element of a Linked ListONSITE INTERVIEW · Seen Nov 2024
  • Minimum in a Rotated Sorted ArrayONSITE INTERVIEW · Seen Sep 2024
  • Mirror Image Binary TreesONSITE INTERVIEW · Seen Sep 2024

Similar questions at other companies

  • Count User Mentions in Chat MessagesRamp · OARamp interview questions
  • Group Transactions by HourAffirm · ONSITE INTERVIEWAffirm interview questions
  • Catch Fish with Reusable BaitsSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Merge Sorted ArrayDP World · ONSITE INTERVIEW
  • Word Frequency Counts in Alphabetical OrderAbridge · OAAbridge interview questions
  • Rank Football TeamsCapital One · OACapital One interview questions
  • Maximum Apples That Fit in a BoxVirtu Financial · OAVirtu Financial interview questions
  • Map and Accumulate Learning QueriesPalantir · ONSITE INTERVIEWPalantir interview questions
  • Meeting RoomsGoldman Sachs · PHONE SCREEN · ONSITE INTERVIEWGoldman Sachs interview questions
  • Rank Football TeamsPersona · OAPersona interview questions

Interview reports that mention this question

  • Expedia Intern Final Round in 2020: 24 Experiences (Part 5 of 6)
  • Expedia Intern Final Round in 2022: 15 Experiences (Part 3 of 6)
  • Expedia New Grad SDE Interviews: 20 Experiences (Part 1 of 3)

Expedia interview experiences

  • Expedia Intern Final Round in 2021: 28 Experiences (Part 4 of 6)
  • Expedia Intern Finals Before 2020: 14 Experiences (Part 6 of 6)
  • Expedia Intern Final Round in 2023: 17 Experiences (Part 2 of 6)
All Expedia interview questionsSee Expedia hiring insights
Saved
class Solution {
    public List<Integer> findDuplicates(int[] values) {
        // Write your code here.
    }

}
Checking account…