Skip to content

Conversation

@072arushi
Copy link
Contributor

Given two numbers x and y, and a range [l, r] where 1 <= l, r <= 32. The task is consider set bits of y in range [l, r] and set these bits in x also.

Examples :
Input : x = 10, y = 13, l = 2, r = 3
Output : x = 14

Input : x = 8, y = 7, l = 1, r = 2
Output : x = 11

@kaal-coder kaal-coder merged commit 513fc19 into kaal-coder:main Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants