[15] Results

Golang : Heap sort example

golang heap-sort sorting recursive

Heapsort algorithm divides the unsorted data into a sorted and an unsorted region, and it iteratively shrinks the unsorted region….... read more


Golang : Sort and reverse sort a slice of integers

golang sort reverse-sort slice

Problem :

How to sort and reverse sort a slice of integers ?

Solution :

Use sort.Ints and sort.Sort functions.….... read more


Golang : Sort and reverse sort a slice of bytes

golang sort reverse-sort slice bytes

Problem :

How to sort and reverse sort a slice of bytes ?

Solution :

Import "github.com/cznic/sortutil"

Use the ByteSlice….... read more


Golang : Sort and reverse sort a slice of floats

golang sort reverse-sort slice float64

Problem :

How to sort and reverse sort a slice of floats ?

Solution :

Declare the slice type as….... read more


Golang : Sort and reverse sort a slice of strings

golang sort reverse-sort slice strings

Sometimes we will want to sort or reverse sort a collection of strings alphabetically. It is pretty easy to sort….... read more


Golang : Bubble sort example

golang sorting bubble-sort

Example for Bubble sort algorithm implementation in Golang. Bubble sort a.k.a sinking sort, is a simple sorting algorithm that repeatedly….... read more


Golang : Time slice or date sort and reverse sort example

golang sort-time time-slice reverse-sort

Sorting time.Time type and dates is pretty straight forward in Golang. Just curious why it is not included in the….... read more


Golang : Check if one string(rune) is permutation of another string(rune)

golang permutation rune sort

Problem:

You need to check if a given input string or rune is actually a permutation of another string(rune). For….... read more


Advertisement