FastPrepFind Unique Elements
Problems/Find Unique Elements

Find Unique Elements

Cisco logoCisco● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: In a Cisco interview for a second role, the first round had a few behavioral questions and then about four coding questions. One of the coding questions was about picking out the unique values from an array.

The post does not say whether unique means appearing exactly once or just each value once, and gives no limits, examples or function signature. Here you return the elements that appear exactly once, in their original order. The array has 1 to 2000 values from -10^5 to 10^5.

Our version is about 75% the same as the reported question.

You are given an integer array nums. Return all elements that appear exactly once in nums, in the order they appear in nums.

If no element appears exactly once, return an empty array.

Function

findUniqueElements(nums: int[]) → int[]

Examples

Example 1

nums = [4,3,4,1,2,3]return = [1,2]

4 and 3 each appear twice. 1 and 2 appear once, so the answer is [1, 2] in the order they appear.

Example 2

nums = [7,7,7]return = []

7 appears three times, so no element appears exactly once. The answer is an empty array.

Example 3

nums = [-5,0,5]return = [-5,0,5]

Every element appears once, so all of them are returned in their original order.

Constraints

  • 1 <= nums.length <= 2000
  • -10^5 <= nums[i] <= 10^5

More Cisco interview questions

  • Check if a String Is a PalindromePHONE SCREEN · Seen Nov 2026
  • First Letter to Appear TwicePHONE SCREEN · Seen Nov 2026
  • Middle of a Linked ListPHONE SCREEN · Seen Nov 2026
  • Reverse a Linked ListPHONE SCREEN · Seen Nov 2026
  • Reverse a StringPHONE SCREEN · Seen Nov 2026
  • Valid ParenthesesPHONE SCREEN · Seen Nov 2026
  • K-Step Bit Flip with RetentionPHONE SCREEN · Seen Nov 2026
  • Longest Non-Repeating SubstringPHONE SCREEN · Seen Jul 2026
  • Todo Task Manager OperationsONSITE INTERVIEW · Seen Oct 2026
  • Find the Duplicate Number Without Modifying the ArrayONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Fixed-Range Frequency CountWaymo · PHONE SCREENWaymo interview questions
  • Count Pairs with Absolute Difference KAdobe · PHONE SCREENAdobe interview questions
  • Frequency Equals Card ValueInMobi · PHONE SCREENInMobi interview questions
  • Pair Left and Right Shoes by SizeMotive · PHONE SCREENMotive interview questions
  • Do All Frequencies Exceed a Threshold?Google · PHONE SCREENGoogle interview questions
  • Apply Operations to Make a String EmptyFlexport · PHONE SCREENFlexport interview questions
  • Find Valid SET Card TriplesSnowflake · OA · PHONE SCREENSnowflake interview questions
  • Best Poker Category with a JokerScale AI · PHONE SCREEN · ONSITE INTERVIEWScale AI interview questions
  • Find All Zip Rummy MeldsZip · PHONE SCREEN · ONSITE INTERVIEWZip interview questions
  • Most Common Three-Website SequencesAmazon · PHONE SCREEN
All Cisco interview questionsSee Cisco hiring insights
Saved
class Solution {
    public int[] findUniqueElements(int[] nums) {
        // Write your code here.
    }
}
Checking account…