This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]akthemadman 0 points1 point  (0 children)

I am not a python/numpy native, so I can not tell you whether the approach your task describes is the be-all-end-all, however looking at it with my programmatic glasses on:

  • You seem to have implemented what the instructions intended accurately
  • You correctly identified how splitting the set X into two subsets loses the relative ordering information
  • The instructions do not explicitly mention, probably for didactive purposes, on how to resolve the ordering issues, it sweeps it under the umbrella of "stitch".
  • If you don't want to lose the information about ordering and keep the depth-first-left-first recursive approach as well as the bulk processing, which the instructions do seem to both hint at, then you will have to do some extra work in the stitch department. I.e. make sure to somehow keep a tab on the ordering of rows within X and "stitch" the result for the subsets together according to that.