Given a string s where each character is either a plate '*' or a candle '|', and a queries where queries[i] = [ left_i , right_i ] represents the substring s[left_i...right_i] inclusive.
For each query, determine the number of plates that are situated between two candles within the specified substring. A plate is considered between candles if there exists at least one candle to its left and at least one candle to its right within the substring boundaries.
Return an integer array answer where answer[i] is the solution to the ith query.
Constraints:
s.length
s consists of '*' and '|' characters.
queries.length
queries[i].length
left_i right_i s.length
Given a string s where each character is either a plate '*' or a candle '|', and a queries where queries[i] = [ left_i , right_i ] represents the substring s[left_i...right_i] inclusive.
For each query, determine the number of plates that are situated between two candles within the specified substring. A plate is considered between candles if there exists at least one candle to its left and at least one candle to its right within the substring boundaries.
Return an integer array answer where answer[i] is the solution to the ith query.
Constraints:
s.length
s consists of '*' and '|' characters.
queries.length
queries[i].length
left_i right_i s.length