Challenge 2: Check If Number Is Even/Odd
This is an example of another Bitwise question. Think of the rightmost bit of a number and think of some logic that could solve this.
We'll cover the following
Introduction
This is a classic question in Mathematics 🧮 for computers.
For example:
Inputs: 1, 3, 5, 7, ...
Output: Odd
Input: 2, 4, 6, 8, ...
Output: Even
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.