Frage im Vorstellungsgespräch bei Sabre

In interview they asked the optimizes code for Coin Change II Problem( Leetcode)