SkillAgentSearch skills...

Leetcode916

We are given two arrays A and B of words. Each word is a string of lowercase letters. Now, say that word b is a subset of word a if every letter in b occurs in a, including multiplicity. For example, "wrr" is a subset of "warrior", but is not a subset of "world". Now say a word a from A is universal if for every b in B, b is a subset of a. Return a list of all universal words in A. You can return the words in any order.

Install / Use

/learn @selvaramkumar/Leetcode916
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

leetcode916

We are given two arrays A and B of words. Each word is a string of lowercase letters. Now, say that word b is a subset of word a if every letter in b occurs in a, including multiplicity. For example, "wrr" is a subset of "warrior", but is not a subset of "world". Now say a word a from A is universal if for every b in B, b is a subset of a. Return a list of all universal words in A. You can return the words in any order.

To run

Python solution.py

python version

python 3.5

inputs

hardcoded now can be changed in listA and listB variable

leetcode

55 test case passed in leet code

Related Skills

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated5y ago
Forks0

Languages

Python

Security Score

55/100

Audited on Jan 1, 2021

No findings