C# O(1) solution
Approach\nPropagating any set bit to the right by 8 bits then 4 bits, then 2 bits and finally 1 bit, using a shift and or operation, results in all bits to the 
# Approach\nPropagating any set bit to the right by 8 bits then 4 bits, then 2 bits and finally 1 bit, using a shift and or operation, results in all bits to the right of any set bit also getting set.\n\nFor example: `001000000000` -> `001000000010` -> `001000100010` -> `001010101010` -> `001111111111`\n\n# Complexity\n- Time complexity:\n$$O(1)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```csharp []\npublic class Solution {\n    public int SmallestNumber(int n) {\n        n |= n >> 8;\n        n |= n >> 4;\n        n |= n >> 2;\n        return n | n >> 1;\n    }\n}\n```
['C#']