题目:
给你字符串 s 和整数 k 。
请返回字符串 s 中长度为 k 的单个子字符串中可能包含的最大元音字母数。
英文中的 元音字母 为(a, e, i, o, u)。
思路:定长滑动窗口 入 更新 出
代码:
class Solution {pub…
42. 接雨水
class Solution {public int trap(int[] height) {int ans 0;Deque<Integer> st new ArrayDeque<>();for(int i 0; i < height.length; i){while(!st.isEmpty() && height[i] > height[st.peek()]){int mid height[st.pop()];if(st.…