Categories
interview

Minimum Window Substring – Java

The brute force method would be calculate all the substrings, which would be inefficient.

Runtime Complexity O(m + n)

Space Complexity O(m+n)

Categories
interview

UTF-8 Validation – Java

Hint UTF-8 ranges between 1 to 4 bytes (8-bits).

Runtime: O(n)