![]() |
VOOZH | about |
Given an integer N, the task is to convert N minutes to seconds.
Note: 1 minute = 60 seconds
Examples:
Input: N = 5
Output: 300 seconds
Explanation: 5 minutes is equivalent to 5 * 60 = 300 secondsInput: N = 10
Explanation: 600 seconds
Output: 10 minutes is equivalent to 10 * 60 = 600 seconds
Approach: To solve the problem, follow the below idea:
We know that 1 minute is equal to 60 seconds, so to convert N minutes to seconds, we can simply multiply N with 60 to get the total number of seconds.
Step-by-step approach:
Below is the implementation of the above approach:
600 seconds
Time Complexity: O(1)
Auxiliary Space: O(1)