Documentation ¶
Index ¶
- func GetDuplicates(array []int) (result []int)
- func GroupAnagrams(array []string)
- func MergeSort(items []int)
- func MergeSorted(a, b []int, lastA, lastB int)
- func SearchListy(list Listy, value int) int
- func SearchRotatedArray(array []int, x int) int
- func SearchStringExcludingEmpty(strings []string, str string) (index int)
- func SortPeakValley(array []int)
- func SwapArray(array []int, i, j int)
- type BitSet
- type Listy
- type MatrixCoordinate
- type RankNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDuplicates ¶
GetDuplicates returns the duplicates in array
func GroupAnagrams ¶
func GroupAnagrams(array []string)
GroupAnagrams groups anagrams in an array in place.
func MergeSort ¶
func MergeSort(items []int)
MergeSort sorts an item recursively using the mergesort algorithm
func MergeSorted ¶
MergeSorted merges 2 sorted arrays into the first array.
func SearchListy ¶
SearchListy searches a a listy for a value
func SearchRotatedArray ¶
SearchRotatedArray searches a rotated array for value X
func SearchStringExcludingEmpty ¶
SearchStringExcludingEmpty searches for a string excluding the empty string
func SortPeakValley ¶
func SortPeakValley(array []int)
SortPeakValley sorts an array into peaks and valleys
Types ¶
type MatrixCoordinate ¶
type MatrixCoordinate struct {
// contains filtered or unexported fields
}
MatrixCoordinate represents teh coordinates of a matrix
func FindElementInSortedMatrix ¶
func FindElementInSortedMatrix(matrix [][]int, x int) *MatrixCoordinate
FindElementInSortedMatrix finds x in a matrix that is sorted by both row and column
func NewMatrixCoordinate ¶
func NewMatrixCoordinate(row, col int) MatrixCoordinate
NewMatrixCoordinate creates a new coordinate
Click to show internal directories.
Click to hide internal directories.