> For the complete documentation index, see [llms.txt](https://ayushkumar-21je0209s-organizatio.gitbook.io/untitled/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayushkumar-21je0209s-organizatio.gitbook.io/untitled/some-things.md).

# Some Things

### In BFS visite all nodes inside the for(auto ch:graph\[node]) loop

### (-x) = 2's complement of x and 2's complement of x = (\~x) + 1

### Finding the right most set bit : (n & (-n))

### Removing the right most set bit : (n- (n & (-n)))

### Finding the left most set bit : (n & (n-1))

### Finding the right most unset bit : (\~n & (n+1))

### Finding the left most unset bit : (\~n & (n-1))

### To check if a number is a power of 2: n & (n-1) == 0

### a + b = (a XOR b) + 2\*(a & b)
