algorithms

package module
v1.0.1-0...-ce188a4 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 2 Imported by: 0

README

Go Go Report Card GoDoc

Example of creating a Go module with different sorting algorithms

  • Generating an array with random values
  • Binary Sort
  • Select Sort
  • Recursive
  • Quick Sort
  • MinMax

Documentation

Overview

Package algorithms package demonstrates some basic algorithms Binary Sort , Select Sort , Recursive , Quick Sort , Hash table

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearch

func BinarySearch(arr []int, item int) int

BinarySearch sorting array, arr is input array, item search value , return arr.

func Fact

func Fact(x int) int

Fact calc

func MakeArray

func MakeArray(size int) []int

MakeArray creating an empty array, size , return x.

func MinMax

func MinMax(array []float64) (min float64, max float64)

MinMax is finds the minimum and maximum elements in the array.

func QuickSort

func QuickSort(arr []int) []int

QuickSort is fast sorting.

func RandomFillArray

func RandomFillArray(arr []int, rangeRandom int) []int

RandomFillArray filling an array with random numbers

func Recursive

func Recursive(i int) int

Recursive search

func SelectorSort

func SelectorSort(arr []int) []int

SelectorSort sorting array, arr is input array. return arr

Types

This section is empty.

Jump to

Keyboard shortcuts

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