Tuesday, September 12, 2017

Catalan number (II)

Sept. 12, 2017

Introduction


It is the classical algorithm to calculate the catalan number. My last practice is documented here. It is very challenge to work with the peer and I ran into the index out of range error in my first writing, and then I modified the code, and argued that first row and first column should exclude from the double for loop, and discuss first row and first column separately.

I need to work on the algorithm problem solving, need to look into the feedback.

Algorithm practice 


C# practice code is here which passes all test cases. 


From the above feedback, I did not communicate very well this time. Need to figure out how to clarify of my answers and line of reasoning. 


Follow up 


January 17, 2018

It is the first time I know how to review my own past practice. Missing the analysis of the algorithm writing is a big issue for me now, production ready code should be written with some analysis and time complexity and space complexity. I have to write down the algorithm, and constraints, and the requirement, what problem to solve. And also my analysis of the problem, solve it on a simple example, go over the example to explain to the peer first. And make sure that the peer understands the problem.

From the transcript of the practice, I did not write any analysis of the algorithm. That is not good practice at all.

The peer did complain and I should have let peer know the algorithm and how to solve it first using a simple example. 

No comments:

Post a Comment