Skip to content

wdi-infinity/amex-week_09-day_02-lonely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

lonely

Lonely or Uncommon ?

lonenly

Given an array of integers, every element appears twice except for one 😧

Find that lonely number !!

Example 1:

Input: [3,3,1]
Output: 1

Example 2:

Input: [4,6,9,6,9]
Output: 4

Uncommon

Uncommon Words from Two Sentences

given two sentences A and B.

sentence is a string of space separated words. Each word consists only of lowercase letters.

A word is uncommon if it appears exactly once in one of the sentences, and does not appear in the other sentence.

Return a list of all uncommon words.

You may return the list in any order.

Example 1:

Input:
A = "i love express it is awesome",
B = "i love express it is cool"
Output: ["awesome","cool"]

Example 2:

Input:
A = "ruby ruby",
B = "rails"
Output: ["rails"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published