Aman Sharma has Published 69 Articles

How to Pass an Array to the Function in Golang?

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 17:04:40

494 Views

In programming, to make the code more modular, usable, and readable we break the code into different functions. For example, we have to sort some set of numbers for which we will create a separate function. For this, we have a data structure called arrays in programming that is nothing ... Read More

How to pass a string to the function in Golang?

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 16:59:44

754 Views

In this tutorial, we are going to learn about how to pass a string in function as an argument in Golang. In programming, to make the code more modular, usable, and readable we break the code into different small blocks and these blocks are known as functions. If you have ... Read More

How to Find Whether the given Number is PRIME or not using Recursion in Golang?

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 16:48:16

112 Views

In mathematics, there are numbers that can be divisible by 1 or by itself, and such numbers are called Prime numbers. For example, 2, 3, 5, 7 … etc. In programming, we can create a program to check number is prime or not. In this article, we will use the ... Read More

How to find the Tangent of a given Radian Value in Golang?

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 16:40:12

39 Views

The ratio of the radian’s adjacent side and the opposite side is known as the tangent of the given radian. Golang language has many packages with predefined functions that the developer can use without writing the complete logic. To perform the mathematical operations and logic we have a math ... Read More

How to Check Whether a Number is Even or Odd in Golang?

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 16:08:51

2K+ Views

In this tutorial, we are going to learn how we can check whether the number is even or odd. The number that can be divisible by 2 is an even number and the number that is not divisible by two is an odd number. This tutorial includes three different ... Read More

How Does One Install Pip in a Docker Container using a Dockerfile?

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 15:59:34

4K+ Views

In this tutorial, we are going to learn how we can install pip in a Docker container using a Dockerfile. This tutorial will cover the creation of the Dockerfile and then we will see the docker command to build a docker image from the Dockerfile, and in last we will ... Read More

Golang Program to Sort an Array of 0’s, 1’s and 2’s

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 15:49:33

51 Views

In Golang, like other programming languages, we can code the logic to sort an array that has 0’s, 1’s, and 2’s as elements. Sorting means assigning the data either in increasing order or in decreasing order. This is one of the famous questions on the array asked in interviews. There ... Read More

Golang Program to Implement Linear Search Algorithm

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 15:44:46

184 Views

In programming, to search for anything from an array, linked List, or from any other data structures we have a few search algorithms, one of which is Linear search. In the linear search, we iterate over the data structure from starting and search for the element till the last index. ... Read More

Golang Program Right View of Binary Tree

Aman Sharma

Aman Sharma

Updated on 10-Jul-2023 15:12:35

70 Views

In programming, there is a coding problem of binary tree that gets asked very frequently in interviews and the problem statement is to find the right view of a binary tree. If we try to understand the problem statement more than what exactly the right view is then we ... Read More

How to create a Function with Arguments but without a return value in Golang?

Aman Sharma

Aman Sharma

Updated on 17-Jan-2023 10:44:33

215 Views

This tutorial will teach us how to create a function with arguments but without a return value. This tutorial involves a gist about the function, and syntax for the function with argument and without return type in Golang, then last we will see two different examples of a function with ... Read More

Advertisements