Akhil Sharma has Published 156 Articles

Golang program to get maximum and minimum from a slice

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 15:00:51

In this article, we will see how to fetch maximum and minimum elements from a slice. 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, meaning its value is not fixed and can ... Read More

Golang to check if a slice is empty

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:58:50

In this article, we will check if the slice is empty or not using a variety of examples. 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, meaning its value is not fixed ... Read More

Golang program to check if two slices are equal

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:55:05

In this article, we will see what are the ways to check whether two slices are equal or not with the help of relevant examples. 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 ... Read More

Golang program to count the elements of a slice

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:52:16

In this article, we will learn how to count the elements of a slice using a different set of examples. 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, meaning its value is ... Read More

Golang to remove null from a slice

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:48:17

In this article, we will learn how to remove a null value from a slice using a variety of examples. 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, meaning its value is ... Read More

Golang program to calculate the sum of right diagonal elements

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:44:46

In this article, we will learn how to calculate the sum of right diagonal matrix with the help of different examples. A matrix is a 2-d array. The output will be printed on the screen using fmt.println() function which is a print statement in Golang. Algorithm Step 1 − ... Read More

Golang program to calculate the sum of left diagonal matrix

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:41:36

In this article, we will learn how to calculate the sum of left diagonal matrix with the help of different examples. A matrix is a 2-d array. The left diagonal matrix is printed using the logic of indexes equal to each other. The output will be printed on the screen ... Read More

Golang program to print the left diagonal matrix

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:39:06

In this article, we will see how to print the left diagonal matrix with the help of suitable examples. A matrix is a 2-d array. Here in the examples, we will use a nested for loop which will iterate through the rows and columns of the matrix to print the ... Read More

Golang program to print right diagonal matrix

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:36:40

In this article, we will see how to print the right diagonal matrix with the help of suitable examples. A matrix is a 2-d array. Here in the examples, we will use a nested for loop which will iterate through the rows and columns of the matrix to print the ... Read More

Golang program to initialize a slice

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:34:56

In this article, we will learn how to initialize a slice using a variety of ways in examples. 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, meaning its value is not fixed ... Read More

1 2 3 4 5 6 7 ... 16 Next
Advertisements