We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
funcstones(n:Int,a:Int,b:Int)->[Int]{// Write your code hereguardn>1else{return[]}varresults:Set<Int>=[]fornBin0..<n{letsum=nB*b+(n-nB-1)*aresults.insert(sum)}returnresults.sorted()}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Manasa and Stones
You are viewing a single comment's thread. Return to all comments →
Swift