Skip to main content
Crowdfunding
Python + AI for Geeks
Practice

Coding Quiz - Find Unique Words

In this coding quiz, you will write a function to find the unique words in a given array of strings.

You will receive an array of strings as input and return a list of words that appear only once in the array.

The order of the words in the list should be the same as their order in the original array.

For example, if the string array is ["apple", "banana", "apple", "orange"],

"banana" and "orange" each appear only once, so you should return the list ["banana", "orange"].


Write the code
def solution(words):
# Write your code here
return



Constraints

  • The length of the input string array is at least 1.

  • Each element of the array is a word consisting of lowercase alphabetic characters only.




Sample Input and Output

  • Input: ["apple", "banana", "apple", "orange"]

  • Output: ["banana", "orange"]

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.