testcases

package module
v0.0.0-...-9cf9ffb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2019 License: MIT Imports: 2 Imported by: 0

README

After cloning, just delete the tail end of the folder name.

Documentation

Overview

testcases is a simple utility library to reduce redundant code in my algorithms repos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomInt

func RandomInt(n int, mod int) []int

RandomInt is a method that provides a list of integers The integers are generated randomly and scoped to the mod argument, the length is n

func ReverseSorted

func ReverseSorted(n int) []int

ReverseSorted provides a list of integers from n to 1, the length is n The output is reverse sorted

func ScrambleList

func ScrambleList(list []int)

ScrambleList randomly swaps length of list times

func Sorted

func Sorted(n int) []int

Sorted provides a list of integers starting from 1 to n, the length is n The output is already pre-sorted

func SortedStep

func SortedStep(n int, start int, step int) []int

SortedStep provides a list of integers from 1 to 2n + 1 The length of the list is n

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL