I\'ve tried my best on the following challenge (my approach is detailed below after description), and devised some sub-optimal pseudo-algorithm. I\'ll be glad to hear your t