sahilbansal17 / Competitive_Coding

This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
GNU General Public License v3.0
406 stars 308 forks source link

Another way of doing turn_on_ith_bit.cpp problem #606

Closed shravantal closed 4 years ago

shravantal commented 4 years ago

https://github.com/sahilbansal17/Competitive_Coding/blob/f4e86ba15340c56d312eac59ce299766d239c26a/Algorithms/BitMasking/Turn%20On%20ith%20bit/turn_on_ith_bit.cpp#L9

n|(1<<i)