Skip to content

5.7 Pairwise Swap #104

Open
Open
@hamidgasmi

Description

@hamidgasmi

Write a program to swap odd and even bits in an integer with as few instructions as possible
Example: bit 0 and bit 1 are swapped,
bit 2 and bit 3 are swapped, etc.

Cracking The Code Interview, pp. 116.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions