Write an O(N) running function that returns true if:
- Every element of string A are all elements of string B
- Every element of string B are all elements of string A
Expected Output:
- contains(‘abcd’, ‘abcd’); // true
- contains(‘abcd’, ‘abcdd’); // true
- contains(‘abcdd’, ‘abcd’); // true
- contains(‘abcd’, ‘cdab’); // true
- contains(‘abcd’, ‘jkslsd’); // false
- contains(‘decbae’, ‘abcd’); // true
- contains(‘ccccbaaad’, ‘accee’); // false
Guaranteed Inputs:
- { a, ..., z, A, ..., Z }
Proposed Solution: https://repl.it/KZ3i/1
