algorithms

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearch

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

BinarySearch performs binary search on a sorted slice

func BinarySearchRecursive

func BinarySearchRecursive(arr []int, target int) int

BinarySearchRecursive performs recursive binary search on a sorted slice

func BoyerMooreSearch

func BoyerMooreSearch(text, pattern string) []int

BoyerMooreSearch performs Boyer-Moore pattern searching

func BubbleSort

func BubbleSort(arr []int) []int

BubbleSort performs bubble sort on an integer slice

func CountingSort

func CountingSort(arr []int) []int

CountingSort performs counting sort on an integer slice

func ExponentialSearch

func ExponentialSearch(arr []int, target int) int

ExponentialSearch performs exponential search on a sorted slice

func FibonacciSearch

func FibonacciSearch(arr []int, target int) int

FibonacciSearch performs Fibonacci search on a sorted slice

func HeapSort

func HeapSort(arr []int) []int

HeapSort performs heap sort on an integer slice

func InsertionSort

func InsertionSort(arr []int) []int

InsertionSort performs insertion sort on an integer slice

func InterpolationSearch

func InterpolationSearch(arr []int, target int) int

InterpolationSearch performs interpolation search on a sorted slice

func JumpSearch

func JumpSearch(arr []int, target int) int

JumpSearch performs jump search on a sorted slice

func KMPSearch

func KMPSearch(text, pattern string) []int

KMPSearch performs Knuth-Morris-Pratt pattern searching

func LevenshteinDistance

func LevenshteinDistance(str1, str2 string) int

LevenshteinDistance calculates the minimum number of single-character edits required to change one string into another

func LinearSearch

func LinearSearch(arr []int, target int) int

LinearSearch performs linear search on a slice

func LongestCommonSubsequence

func LongestCommonSubsequence(text1, text2 string) string

LongestCommonSubsequence finds the longest common subsequence of two strings

func MergeSort

func MergeSort(arr []int) []int

MergeSort performs merge sort on an integer slice

func QuickSort

func QuickSort(arr []int) []int

QuickSort performs quick sort on an integer slice

func RabinKarpSearch

func RabinKarpSearch(text, pattern string) []int

RabinKarpSearch performs Rabin-Karp pattern searching

Types

This section is empty.

Jump to

Keyboard shortcuts

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