Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 524 Bytes

Electronics Shop.md

File metadata and controls

16 lines (12 loc) · 524 Bytes

Question

  • You are given 2 arrays
    • For int[] keyboards, each element represents a price of a keyboard.
    • For int[] drives, each element represents the price of a drive
  • You have b dollars to spend. You want to buy 1 keyboard, and 1 drive, but also want to maximize the money you spend on this purchase
int getMoneySpent(int[] keyboards, int[] drives, int b) {
  // maximize money spent
}

HackerRank Full Question

Electronics Shop