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.
var result int32 =-1
for i := 0 ; i < len(keyboards) ;i++{
for j :=0 ; j < len(drives);j++{
if( keyboards[i] + drives[j] > result && keyboards[i] + drives[j] <=b) {
result = keyboards[i] + drives[j]
}
}
}
return result
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Electronics Shop
You are viewing a single comment's thread. Return to all comments →
//Golang Solution func getMoneySpent(keyboards []int32, drives []int32, b int32) int32 {
}