You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
335 B
Go
17 lines
335 B
Go
package cses
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestWeirdAlgo(t *testing.T) {
|
|
assert.Equal(t, "[3 10 5 16 8 4 2 1]", WeirdAlgo(3))
|
|
}
|
|
|
|
func TestMissingNumber(t *testing.T) {
|
|
assert.Equal(t, 4, MissingNumber(5, []int{2, 3, 1, 5}))
|
|
assert.Equal(t, 7, MissingNumber(9, []int{2, 3, 1, 5, 4, 6, 9, 8}))
|
|
}
|