FastPrepEven or Odd Without Division
Problems/Even or Odd Without Division

Even or Odd Without Division

Adobe logoAdobe● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: This problem decides whether a whole number is even or odd, with division ruled out. The source is an entry (a copy of a review) about a senior QA automation interview in Hyderabad, India, in April 2022 that ended with no offer. The parity item sits in the entry's question list after a count of repeated characters and two puzzles. The account of round one names puzzles plus coding, so placing it there is our reading. The item rules out only the slash operator for dividing. It gives no number range, output form or examples.

Our choices: the remainder operator is banned too, since it is division in another form. The editorial teaches the rule, but we cannot check it. The input is any 32-bit integer, negatives included. The answer is true for even. The examples are new.

Our version is about 85% the same as the reported question.

Given an integer n, return true if n is even and false if it is odd.

Practice rule: solve it without division and without the remainder operator (/ and % in most languages). The judge checks only the answer, so this rule is not enforced; it is the point of the exercise.

Negative numbers follow the usual rule: a number is even when it is 2 times some integer, so -4 and 0 are even and -7 is odd.

Function

isEven(n: int) → boolean

Examples

Example 1

n = 14return = true

14 is 2 times 7, so it is even. The answer is true.

Example 2

n = -9return = false

-9 lies between -10 and -8, two even numbers, so it is odd. The answer is false.

Example 3

n = -1073741824return = true

-1073741824 is -2^30, which is 2 times -2^29, so it is even. The answer is true.

Constraints

  • -2^31 <= n <= 2^31 - 1

More Adobe Phone Screen questions

  • Evaluate a Parenthesized Integer ExpressionPHONE SCREEN · Seen Oct 2026
  • All Elements of Two BSTs in OrderPHONE SCREEN · Seen Aug 2026
  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Binary Tree Level-Order Traversal by LevelsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Count Occurrences in a Sorted ArrayPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Count Pairs with Absolute Difference KPHONE SCREEN · Seen Jul 2026
  • Count Subsets with Sum KPHONE SCREEN · Seen Jul 2026
  • Numbers with Exactly Three DivisorsPHONE SCREEN · Seen Jul 2026
  • Sum of Even Nodes on a Path in a Numbered Binary TreePHONE SCREEN · Seen Jul 2026
  • Largest Value in Every Sliding WindowPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Count the 1 Bits in a 32-Bit ValueAmazon · PHONE SCREEN
  • Power of Two Without DivisionArm · PHONE SCREEN
  • Powers of Two in a RangeAkuna Capital · PHONE SCREENAkuna Capital interview questions
  • Choose the Next Minesweeper ActionRunloop · PHONE SCREEN
  • IP Address to CIDR BlocksOpenAI · PHONE SCREENOpenAI interview questions
  • Fewest Games to Find the Top Two TeamsSusquehanna International Group (SIG) · PHONE SCREENSusquehanna International Group (SIG) interview questions
  • Minimum Testers to Find the Poisoned BottleWalleye Capital · OA
  • Address on Same PageNVIDIA · OANVIDIA interview questions
  • Find the Missing Number from 1 to nHyperVerge · ONSITE INTERVIEW
  • Find the Missing Number from 1 to nGEP · OA

Interview reports that mention this question

  • Adobe Frontend and QA Interviews: 14 Experiences (Part 6 of 6)

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)
  • Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
  • Adobe New Grad MTS Interview Questions: 7 Experiences
  • Adobe ML/Research Intern Interviews: 12 Experiences (Part 4 of 4)
All Adobe interview questionsSee Adobe hiring insights
Saved
class Solution {
    public boolean isEven(int n) {
        // Write your code here.
    }
}
Checking account…