LeetCode – Minimum Window Substring (Java)
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = “ADOBECODEBANC”, T = “ABC”, Minimum window is “BANC”. Java Solution public String minWindow(String s, String t) { HashMap<Character, Integer> goal = new HashMap<>(); int goalSize = … Read more