Iterative solution to 6.22 in 1.4.7

#1

I created an iterative solution to 6.22 based on a bit different thinking. It also removes the need to check for odd dimension. Check it out here.

0 Likes

#2

Hey Ray,

I think your solution is very similar to the alternative implementation listed in the book. Please take a look of that.

0 Likes

#3

Indeed! I couldn’t understand it initially and now come to take a closer look - stupid me! lol

0 Likes

#4

The implementation you had is a straight-forward version most interviewers and interviewees would prefer during interview (easy to implement and debug). Mine is originated from the skills I learned years ago as a programming contestant and is a little cryptic :stuck_out_tongue:

1 Like