Browsed by
Month: September 2024

Working with Date and Time in Golang

Working with Date and Time in Golang

Managing dates and times is a common task in many applications, whether it’s logging events, scheduling tasks, or measuring time intervals. Go, as a modern programming language, offers a robust set of built-in tools for handling date and time efficiently. The time package in Go provides various utilities to work with time zones, parse and format dates, measure time durations, and perform operations like adding or subtracting time. In this article, we will explore the basics of working with date…

Read More Read More

Implementing counting sort with Golang

Implementing counting sort with Golang

What it is counting sort Counting Sort is an algorithm for sorting keys that are small integers and repeatable values. However, it is not recommended for large keys because the logic consists of using an array where the value serves as the index of the array to store the counts of each key. Thus, the length of this array is calculated as store = len(max – min + 1). After that, the algorithm rebuilds the order of the values according…

Read More Read More