Friday, May 4, 2018

Being an interviewer: Find minimum substring containing all characters

May 4, 2018

Introduction


It is very good learning experience to be an interviewer for this hard level algorithm from Leetcode. The algorithm is hard for the first time player to come out the optimal solution using slide window, and also apply time complexity O(n) where n is the string's length.

I just learned one more time to communicate with the peer, worked on brute force solution first, and then moved on optimal solution discussion after 30 minutes.

Mock interview


Here is Java code I reviewed. I also started to ask questions about Java, and ask the peer how long they work on Java, why to choose Java for interview.

I was so glad to introduce the slide window technique to the peer, and also used the example: "AAAAABC", explained that extra four A characters can be removed for minimum substring.



No comments:

Post a Comment