you check if every char in original has the same count in original and test, but this does not work if test is a superset of original; your function fails for e.g. "b", "" or "aaacccb", "aaaccc".
original
test
"b", ""
"aaacccb", "aaaccc"
yes its the ASCII code taple
a link : https://upload.wikimedia.org/wikipedia/commons/1/1b/ASCII-Table-wide.svg
Loading collection data...
you check if every char in
original
has the same count inoriginal
andtest
, but this does not work iftest
is a superset oforiginal
; your function fails for e.g."b", ""
or"aaacccb", "aaaccc"
.yes its the ASCII code taple
a link : https://upload.wikimedia.org/wikipedia/commons/1/1b/ASCII-Table-wide.svg