Learn DSADSAContests
coding75 logo
LeetCode POTDPOTDSheets
coding75 Pro
coding75 logo
Dashboard
Learn DSA
Course RoadmapFlow
DSA Topic TreeNew πŸš€
Contest SolutionsPractice
Practice Sheets
MasterclassesLive πŸ‘¨πŸ»β€πŸ’»

coding75 ProPRO

Live Classes & Placement Guidance

coding75 logo

The premier developer platform for mastering Data Structures & Algorithms, exploring contest editorials, building ATS-ready resumes, and accelerating your tech career.

Connect & Community

DSA & Contests

  • Learn DSA
  • Contest Solutions
  • LeetCode POTDDaily
  • Practice Sheets
  • MasterclassesSoon

Interview Prep

  • Portfolio Projects
  • CS Fundamentals
  • System DesignSoon
  • Interview ExperiencesSoon
  • Mock InterviewsSoon

Career & Pro

  • Jobs & Internships
  • Resume BuilderATS
  • coding75 Pro
  • Submit Feedback
Β© 2026coding75β€’crackDSAβ„’β€’Maa Lalita Edtech Private Limited. All Rights Reserved.
Privacy PolicyTerms & ConditionsContact Support
Registered Office: Kanpur 208021β€’Regional Office: Indiranagar, Bangalore, 560008
Maa Lalita Edtech Private Limited
Contests/CodeChef/Starters 124/Binary Parity
Next
CodeChefCodeChef
1 Star
Starters 124

Binary Parity

Bit ManipulationMath
Loading...
Solve on CodeChef

Problem Statement

Official algorithmic problem description and constraints.

Open on CodeChef

The binary parity of an integer N is defined as follows: First, write N in binary. For example, = 13 N=13 is written as 1101 1101 in binary, and = 5 N=5 is written as 101 101. Compute S N ​ , the sum of the binary digits of N. For example, from the earlier examples, 13 = 1 + 1 + 0 + 1 = 3 S 13 ​ =1+1+0+1=3 and 5 = 1 + 0 + 1 = 2 S 5 ​ =1+0+1=2. The binary parity of N is then the parity † † of S N ​ . 13 = 3 S 13 ​ =3 is odd, so 13 13 is said to have odd binary parity; while 6 = 2 S 6 ​ =2 is even, so 5 5 has even binary parity. Given an integer N, find its binary parity. † † The parity of an integer is, quite simply, whether it's even or odd. We say an integer has even parity if it is a multiple of 2 2, and odd parity otherwise.

Solutions & Walkthrough

Detailed video explanations, mathematical intuition, and clean C++ implementation code.

Connecting secure classroom stream...
Back to Starters 124
Next Problem