Click4Ai

238.

Easy

The Temperature Sampling problem involves generating text based on a given temperature parameter. **Example:** Given a temperature of 0.5, generate the next word in a sequence. **Constraints:** The input will be a list of words and a temperature parameter.

Test Cases

Test Case 1
Input: ["hello", "world"], 0.5
Expected: "hello"
Test Case 2
Input: ["apple", "banana"], 1.0
Expected: "apple"
+ 3 hidden test cases