Question: Which snippet correctly shows setting the variable max to whichever variable holds the greatest value, a or b, using idiomatic Kotlin?

  1. `val max3 = a.max(b)` (Extension Function is One of the idiomatic Solutions in Kotlin)
  2. `val max = a > b ? a : b`
  3. `val max = if (a > b) a else b`
  4. `if (a > b) max = a else max = b`

Answer: The correct answer of the above question is Option A:`val max3 = a.max(b)` (Extension Function is One of the idiomatic Solutions in Kotlin)