Akhil Sharma has Published 507 Articles

Golang program to convert file to byte array

Akhil Sharma

Akhil Sharma

Updated on 21-Feb-2023 12:11:15

18K+ Views

In Go programming language we can use byte function and ioutil.ReadFile function to convert a file into byte array. The os package file type that offers ways to open, read from, write to, and manipulate files whereas array is a fixed-size group of identical elements that may be accessed by ... Read More

Golang program to add elements to a linkedlist

Akhil Sharma

Akhil Sharma

Updated on 21-Feb-2023 12:09:50

2K+ Views

In Golang, we can use node struct and linkedlist struct to add elements to a linkedlist. A linkedlist is a data structure made up of a series of nodes, each of which includes an element and a reference to the node after it in the sequence. It is a linear ... Read More

Golang program to access elements from a linked list

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 16:17:00

481 Views

In Go Programming language, a linked list is a data structure which contains a node that further contains two values, the data and the next, where next points to the next node in the list. We will use two methods in this program to access elements from a linked list. ... Read More

Golang program to remove elements from the linked list

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 16:16:13

1K+ Views

In Go, a linked list is a linear data structure with pointers connecting the items, and from the first node (head) to the last node, each node can be visited (tail). We will execute the program of removing elements from the linked list using two examples. The first example uses ... Read More

Golang program to add elements at first and last position of linked list

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 16:14:56

369 Views

In golang, a linked list is a unique data structure in which there is a value in the node and the next pointer which points to the next node. The list's initial node is referred to as the head, while the list's last node which points to nil depicts the ... Read More

Golang program to implement the Queue data structure

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 16:13:46

2K+ Views

In this Golang program, a queue is a data structure that works on the First-In-First-Out (FIFO) principle where elements are added to the rear and removed from the front. Although Go doesn't come with a built-in queue data structure, slices, linked lists, and other data structures can be used to ... Read More

Golang program to create a string object

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 15:31:01

581 Views

In Golang, a string cannot be modified after they have been created. A built-in type in Go, the string type can be used in a variety of ways much like any other data type. In this article, we will use three methods to create a string object. The first method ... Read More

Golang program to convert vector to a list

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 15:29:15

1K+ Views

In Golang, a vector is referred to as an array or a slice. Slice is a dynamic array whose size can be changed whereas a linked list data structure is one type of list, where each node has a value and is pointing to the next element. We will use ... Read More

Golang program to call one constructor from another

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 15:22:35

935 Views

In Go programming language, a constructor is a specific kind of function used to initialize an object's state when it is initially formed. It is used to initialize variables and provide data for the objects. We will execute this program using two methods and we will use struct in both ... Read More

Golang Program to Check Whether the Given String is Pangram

Akhil Sharma

Akhil Sharma

Updated on 20-Feb-2023 10:54:12

652 Views

In this article, we will understand different golang examples to check whether a given string is pangram. A statement known as a pangram uses each letter of the alphabet at least once. A pangram is a string in the programming language Golang that contains every letter of the alphabet, regardless ... Read More

Advertisements