We start counter
off as the length of req_chars
, and we'll decrement whenever we encounter a letter required. If we get to 0
, it means it's a valid length.
1// from here, we increase begin pointer to make it invalid/valid again
2while (counter === 0) { // valid, we have what we need