Single Number III

Advanced

Welcome to the Number Garden!

In our magical number garden, you are going to find a magical task! Imagine you have a list of numbers, where every element appears twice, except for TWO elements which appear only once. Your job is to find these two unique elements and return them.

This is a bit like playing detective in a big pile of numbers, where only two numbers are sneaky enough to show up once!

Task

Write a function single_number_iii that receives a list of integers and returns a list of the two integers that appear only once in the list.

Example Time!

Here's how your magical function should work:

# Example 1 single_number_iii([1, 2, 1, 3, 2, 5]) # Output: [3, 5] # Example 2 single_number_iii([2, 6, 3, 6, 2, 7]) # Output: [3, 7] # Example 3 single_number_iii([4, 1, 2, 1, 2, 6]) # Output: [4, 6]

The order of the result does not matter. Just make sure you return the two unique numbers!

Remember, a good detective always carefully examines each clue (or number!) to solve the mystery. Have fun coding!

Geek
Inputs

Arg 1:

[1,2,1,3,2,5]
Expected Output
[3, 5]
Actual Output
Single Number III [advanced] | Coding for Kids