Akhil Sharma has Published 671 Articles

Golang Program to Insert a Node in a Sorted Doubly Linked List

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:43:44

109 Views

A doubly linked list could be an information structure where each node contains a reference to both its previous and following nodes. The program points to preserve the sorted arrangement of the linked list whereas inserting an unused node. In this article, we will learn to create a Golang program ... Read More

Recover in Golang

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:42:14

77 Views

In Golang, the recovery mechanism provides a way to deal with panic and recover from it. Panic is an unexpected error that can cause the program to terminate. In this article, we are going to discuss what is recovered in golang. Here we are going to use two different methods: ... Read More

Race Condition in Golang

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:41:13

663 Views

In Go, race conditions occur when goroutines simultaneously read and write to the same shared memory space without synchronization mechanisms. This can cause data corruption, inconsistent states, or crashes.In this article, we are going to discuss race conditions in golang. Here we are going to use two different methods: Synchronization ... Read More

Overview of Benchmark Testing in Golang

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:40:10

155 Views

In this article we are going to discuss an overview of Benchmark testing. Benchmark testing is a basic portion of program optimization to grade the execution and productivity of code. In Golang, benchmark testing is backed through the built-in testing bundle. Here we are going to use the Benchmark function ... Read More

Golang Program to Create an Interface Named Cache that Defines a Set and Get Method

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:37:56

89 Views

The purpose of this interface is to provide a contract for implementing cache functionality in various data structures or systems. The Set method is responsible for storing a value in the cache with a specified key, while the Get method retrieves the value associated with a given key from the ... Read More

Golang Program to Implement Radix Sort for Sorting Integers in Descending Order

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:36:47

59 Views

Radix sort is a non-comparative sorting algorithm that works by distributing elements into different buckets based on their significant digits. In this article, we will explore a Golang program that implements radix sort for sorting integers in descending order. Here we are going to use three different methods: Getmax, countsort, ... Read More

Golang Program to Implement a Binary Heap Using a Linked List

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:32:54

271 Views

A binary heap is a specialized tree-based data structure that satisfies the heap property, where the key of each node is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) the keys of its children. In this program, we ... Read More

Golang Program to Delete a Node From a Red Black Tree

Akhil Sharma

Akhil Sharma

Updated on 20-Jul-2023 14:31:26

85 Views

Red Black Tree is a self-balancing binary search tree with additional properties that ensure a balanced tree structure and efficient operations. The delete operation in a Red Black Tree involves rearranging the tree and maintaining the Red Black Tree properties after removing a node. Here we are going to use ... Read More

Golang program to create random strings

Akhil Sharma

Akhil Sharma

Updated on 19-Jul-2023 14:31:01

68 Views

A string in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. A built-in type in Go, the string type can be used in ... Read More

Golang program to create a module with constant

Akhil Sharma

Akhil Sharma

Updated on 19-Jul-2023 14:27:09

39 Views

In the Go programming language, a module is a collection of packages and it helps to manage them and their dependencies. In this article, we will create a module with constant using two examples. In the first example, we will create a constant string that will be returned by the ... Read More

Previous 1 ... 6 7 8 9 10 ... 68 Next
Advertisements