How do we know when to use bit manipulation to solve a problem?

How do we know when to use bit manipulation to solve a problem?



2 things to watch out for:

1. We want to multiply or divide by 2 (use a left shift to multiply by 2, right shift to divide by 2)

2. We want to cancel out matching numbers. (Using XOR)

Popular posts from this blog

After analyzing the model, your manager has informed that your regression model is suffering from multicollinearity. How would you check if he's true? Without losing any information, can you still build a better model?

Is rotation necessary in PCA? If yes, Why? What will happen if you don't rotate the components?

What does Latency mean?