Loading...
Loading...
Loading...
Store A wants to know which products it sells that store B does not. Both lists can contain repeats.
NONE if there is no such product.Example
Input
4 laptop mouse cable mouse 3 cable keyboard laptop
Output
mouse
Only mouse is missing from store B.
Try the problem first. Open one hint at a time.
Copy store A into a TreeSet, then call removeAll with store B.
If the result isEmpty(), print NONE.
Write your Java code, run it on the examples and submit it to hidden tests.
Solve in the editor