Monday, August 7, 2017

String search algorithm practice

August 7, 2017

Introduction



It is the British Columbia holiday and I booked another mocking practice at 12:00 pm. The practice hours is a very happy time to learn how to work on one algorithm.

Algorithm practice


C# practice code is here. I spent over 10 minutes to fix so many compile errors, but I stopped after running into the execution errors.

After the practice, I found the two problems, one is null pointer error (4 lines of code are added from line 44 to 47), second one is missing a loop (a for loop is added on line 58), I fixed them after mocking practice.

Weakness


There are two issues in my writing in mocking interview. First one is null pointer issue. Second one is to separate the collection from one single item. Need to go over each item in collection, and append each of them.

Plan to do some research on common mistakes in C# code. Using strong typing is a good tip to allow the compiler to help, avoid error in run time checking.


No comments:

Post a Comment