O(n) solution to Multiply Others problem in F#
Another tasty challenge that I ran into during my preparation for technical interviews is this seemingly simple problem from Facebook. input [2,3,1,4] output [12,8,24,6] Multiply all fields except it’s own position. Restrictions: 1. no use of division 2. complexity in O(n) The main challenge is in making the algorithm run in O(n) time. One solution I …