Error
|
|
---|---|
@Ibrahim Nash | 5761 |
@blackshadows | 5715 |
@akhayrutdinov | 5111 |
@mb1973 | 4989 |
@Quandray | 4944 |
@saiujwal13083 | 4506 |
@sanjay05 | 3762 |
@marius_valentin_dragoi | 3516 |
@sushant_a | 3459 |
@verma_ji | 3341 |
@KshamaGupta | 3318 |
Complete Leaderboard | |
|
|
@aroranayan999 | 1115 |
@bt8816103042 | 739 |
@thealchemist627 | 456 |
@akashkale117 | 453 |
@shivanandp12345678910 | 453 |
@dalwainazism125 | 453 |
@codeantik | 448 |
@SherlockHolmes3 | 447 |
@SHOAIBVIJAPURE | 430 |
@shalinibhataniya1097 | 408 |
@ShamaKhan1 | 392 |
Complete Leaderboard |
Given a positive integer N, determine whether it is odd or even.
Example 1:
Input: N = 1 Output: odd Explanation: The output is self- explanatory.
Example 2:
Input: N = 2 Output: even Explanation: The output is self- explanatory.
Your Task:
You don't need to read input or print anything. Your task is to complete the function oddEven() which takes the integer N and return "even" is number is even and "odd" if the number is odd.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
0 <= N <= 10000
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes