Class IsMultipleOfThree
Inherited Members
Namespace: Advanced.Algorithms.Binary
Assembly: Advanced.Algorithms.dll
Syntax
public class IsMultipleOfThree
Methods
IsTrue(Int32)
Based on the observation that a number is multiple of 3 if difference of odd and even set bits in binary form of the number is also a multiple of 3.
Declaration
public static bool IsTrue(int v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | v |
Returns
Type | Description |
---|---|
Boolean |