and newVal. Using iterators, and the insert and erase functions replace all instances of oldVal that appear in s by newVal. Test your function by using it to replace common abbreviations, such as “tho” by “though” and “thru” by “through”.
my attempt
https://privatebin.net/?b3594e1cb7a84fd8#BcMq9Y4J1eBuPhysK3CdTvUqHzJdZVy7oiHJq83Grf3E
some way i can simplify the logic?
you can do that with a prefix tree
@viferga the question and my attempt
Обсуждают сегодня