# DP with Bitmasks

## Bitwise operations and Bitmasks

### Tutorials

Go through this CF blog for an idea of the bitwise operations and the concept of bitmasks.

Go through this CF blog for understanding __builtin_popcount() function and bitsets

### Session slides

- Part 1 - Bitwise Operations and their applications, preventing overflows when using left shift, Bitmasks. The youtube stream in which these topics were discussed can be found here

### Practice problems

- Hackerrank - Counter Game
- Hackerrank - Lovely Integer
- Hackerrank - XOR Sequence
- Hackerrank AND product
- Hackerrank - SUM vs XOR
- Hackerrank - Flipping Bits
- Hackerrank - Sansa and XOR
- 1097/B - Petr and a Combination Lock

## DP with bitmasking

### Tutorials

Learn the algorithm for iterating through all the submasks of a mask from this article of cp-algorithms

Go through this article on hackerearth for understanding DP with bitmasks.

### Session slides

- Part 2 - DP with bitmasks. The youtube stream in which these topics were discussed can be found here