Akhil Sharma has Published 634 Articles

Golang Program to convert int type variables to long

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:07:41

2K+ Views

In go language a long type variable is not a separate data type but it is an extension made from the integer data type to store even larger types of integers. The main difference between an int data type and long data type is that int data type is 32 ... Read More

Golang Program to sort an array in descending order using insertion sort

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:06:25

779 Views

Insertion sort is a simple sorting algorithm that works similarly to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. The elements from unsorted arrays are picked and placed at the correct positions in unsorted arrays, as a ... Read More

Golang Program to cyclically permutes the elements of the array

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:01:07

229 Views

Cyclically means that in every cycle we wish to move the array elements by one position till we get the original array again. Cyclic permutation can be useful in various matrix manipulation and linear algebra operations. In this article, we are going to see different examples to permute the elements ... Read More

Golang Program to check a given number is finite or not

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 19:00:37

1K+ Views

In this article we will write a go language program to check if a given number is finite or not. The program uses IsInf() and IsNaN() library functions in order to check whether numbers are finite or not. Syntax func IsInf(f float64, sign int) bool IsInf() function is present ... Read More

Golang Program to delete an item from the array without using the library function

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:58:49

658 Views

An array in go language is defined as the data structure that is used to store elements in contiguous memory locations. Arrays allow us to search and store elements at constant time. arrays use index to store elements which starts from 0 and goes to n – 1, where n ... Read More

Golang Program to insert an item into the array without using library function

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:54:02

205 Views

An array in go language is defined as the data structure that is used to store elements in contiguous memory locations. Arrays allow us to search and store elements at constant times. arrays use the index to store elements that start from 0 and goes on to n – 1, ... Read More

Golang Program to calculate the sum of columns of matrix elements

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:50:22

527 Views

A matrix is a collection of numbers arranged in rows and columns, a two-dimensional array, each of the values of this matrix is known as an element. Here we will use three methods to find the sum of column elements and compare each method for the same using go programming. ... Read More

Golang Program to calculate the sum of rows of matrix elements

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:46:50

600 Views

A matrix is a collection of numbers arranged in rows and columns, a two-dimensional array. Here we will use three methods to find the sum of elements and compare each method for the same using Go Programming language. Algorithm Step 1 − Import the fmt package. Step 2 ... Read More

Golang Program to Determine the class of an object

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:46:01

179 Views

What are Objects in Golang? Objects are defined on the structs and store Key-value pairs of data together in go programming. There are numerous methods for producing an object. A struct is a user-defined type that groups together a collection of fields (also known as properties or data members) and ... Read More

Go language Program to calculate the sum of matrix elements

Akhil Sharma

Akhil Sharma

Updated on 16-Feb-2023 18:45:05

231 Views

What is a Matrix? A matrix is a collection of numbers that are arranged in rows and columns, which is a two-dimensional array. Here we will use three examples to find the sum of elements and compare each element of the matrix for the same using the Golang program. Algorithm ... Read More

Advertisements