Driver Code
var arr = [ 1 , 2 , 3 , 4 , 7 , 13 ] ; var n = arr . length ; var D = 5 , A = 4 , B = 2 ; document . write ( findPossibleDerivables ( arr , n , D , A , B ) + " " ) ; var a = [ 1 , 2 , 3 ] ; n = a . length ; D = 6 ; A = 3 ; B = 2 ; document . write ( findPossibleDerivables ( a , n , D , A , B ) ) ;