mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
261 B
16 lines
261 B
5 years ago
|
## ispowerof2
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Write a function that determines if a given number is a power of 2.
|
||
|
|
||
|
This function returns true if the given number is a power of 2, otherwise it returns false.
|
||
|
|
||
|
## Expected function
|
||
|
|
||
|
```go
|
||
|
func IsPowerOf2(n uint) bool {
|
||
|
|
||
|
}
|
||
|
```
|