Akhil Sharma has Published 671 Articles

Golang Program to Display Armstrong Number Between Two Intervals

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:35:02

225 Views

An Armstrong number, also known as a narcissistic number, is a number that is equal to the sum of its own digits each raised to the power of the number of digits. Here we will show different approaches about how we can print the Armstrong numbers in go programming language. ... Read More

Golang Program to convert long type variables to int

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:32:27

262 Views

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

Golang Program to get a substring from the string

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:24:19

5K+ Views

A substring in Go is a portion of a larger string. It is specified by providing a start index and a length, and it contains the characters of the original string starting at the start index and going up to the specified length. The characters in a substring are still ... Read More

Golang Program to check the given string is empty or not

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:22:52

747 Views

In Go, a string is a sequence of characters. It is an immutable data type, meaning that once a string is created, it cannot be modified. Strings are enclosed in double quotes ("") and can contain any combination of letters, numbers, and symbols. They are commonly used to store text ... Read More

Golang program to find all subsets of a string

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:21:25

483 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 shuffle the elements of an array

Akhil Sharma

Akhil Sharma

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

678 Views

An array is a fixed sequence of elements in which the elements are placed at contiguous memory locations. We will shuffle and randomly place the elements of the array. In the first case we will use fisher-yates shuffle algorithm. Let’s see how we can execute it using different logics in ... Read More

Golang program to compare two strings

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:12:08

488 Views

In go programming language, string is one of the data-types that can be used for various application. It is a collection of characters and is also immutable. In go programming language a string can't be modified after they have been created. In this article, we are going to study different ... Read More

Golang program to remove a subset from a slice

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:11:33

247 Views

Slice is similar to an array, the only difference is that an array is a fixed sequence of elements whereas slice the array elements are dynamic. This makes the slice more efficient and faster in various applications. In slice, the elements are passed by reference instead of values. In this ... Read More

Golang program to sort a string

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:10:08

4K+ 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 rotate elements of a slice

Akhil Sharma

Akhil Sharma

Updated on 13-Feb-2023 16:09:32

289 Views

A slice is a sequence of elements just like an array. An array is a fixed sequence of elements whereas a slice is a dynamic array, which means its value is not fixed and can be changed. Slices are more efficient and faster than arrays moreover; they are passed by ... Read More

Advertisements