Minimum Amount of Time to Fill Cups
You have a water dispenser capable of dispensing cold, warm, and hot water. Each second, you can choose to fill up either 2 cups with different types of water or 1 cup of any type of water.
Given a 0-indexed integer array, amount, of length 3 where amount[0], amount[1], and amount[2] represent the number of cold, warm, and hot water cups you need to fill, respectively, your task is to determine and print the minimum number of seconds required to fill up all the cups.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)