Fridge Poetry

Published by Helen Yu in

Write a function that returns true if it's possible to build a phrase s1 using only the characters from another phrase s2.

Examples

can_build("got 2 go", "gogogo 2 today") ➞ true

can_build("sit on top", "its a moo point") ➞ true

can_build("long high add or", "highway road go long") ➞ false

can_build("fill tuck mid", "truck falls dim") ➞ false

Notes

  • All letters will be in lower case.
  • Numbers and special characters included.
  • Ignore whitespaces.
  • Do not count white space as a character.
Watch a quick demo on how Edabit works.