Sunday, December 3, 2017

Best learning experience is to help the peer to succeed

Dec. 3, 2017

Introduction


It is the traditional two pointers technique, sliding window, with tough situation to handle left pointer to shorten the substring.

Two programmers were working together this Sunday morning 10:00 AM. The algorithm was written with discussion of the algorithm first with two test cases. And the code was examined carefully by the peer using whiteboard testing, and also platform Run test cases gave failed test case information.

Java code to study 


Here is Java code to study.

I almost forgot to write what I did to help the peer, I asked one question before the peer liked to write code. A test case ['a','b','c'], string is "aaefbcgaxy", and the minimum substring is "bcga".

Another thing Julia did is to look up Java HashMap get API, and reminded that if the key is not in HashMap, get API will return null pointer.



No comments:

Post a Comment