https://github.com/night-codes/1_break_word
https://github.com/night-codes/1_break_word
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/night-codes/1_break_word
- Owner: night-codes
- Created: 2020-01-15T11:47:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-15T12:52:17.000Z (over 5 years ago)
- Last Synced: 2024-04-16T08:56:04.898Z (about 1 year ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task 1. Separate Text
Write a function/method that accepts a list of string tokens and a separate text string as an input and checks if the latter string can be represented as a concatenation of any subset of tokens from the first argument, where each token can be used multiple times. Examples:```
[ "ab", "bc", "a" ] vs. "abc" = true
[ "a", "ab", "bc" ] vs. "ab" = true
[ "a", "ab", "bc" ] vs. "" = true
[ "ab", "bc" ] <-> "abc" = false
[ "ab", "bc", "c" ] <-> "abbcbc" = true
```