
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

789 Views
In computer science, exponentiation is a mathematical operation where a number, also known as the base, is raised to a power. Exponential functions are essential in many fields such as physics, engineering, and computer science. In Go, we can use the math package to perform exponential operations. In this article, we will discuss how to find the base-2 exponential of a number in Golang. We will also provide examples for a better understanding of the topic. Calculating Base-2 Exponential in Golang In Golang, we can use the math package to calculate the base-2 exponential of a number. The math package ... Read More

313 Views
Exponential functions are widely used in mathematics and computer science to represent the growth or decay of various phenomena. In Golang, there are several ways to find the base-10 exponential of a given number. In this article, we will explore some of these methods. Understanding the Base-10 Exponential The base-10 exponential of a given number can be defined as the power to which the number 10 must be raised to obtain the given number. For example, the base-10 exponential of 1000 is 3, because 10 to the power of 3 is 1000. Similarly, the base-10 exponential of 0.01 is -2, ... Read More

2K+ Views
In object-oriented programming, the concept of inheritance allows the creation of a new class that is a modified version of an existing class, inheriting the properties and methods of the base class. Golang doesn't support traditional inheritance, but it provides the concept of interface embedding, which is a powerful way of reusing code. What is Interface Embedding? Interface embedding is a way of composing interfaces by combining two or more interfaces into a single interface. It allows you to reuse the methods of one interface in another interface without having to redefine them. It also provides a way of extending ... Read More

4K+ Views
Go is a statically typed programming language, which means that the type of a variable is determined at compile time. This feature allows the Go compiler to perform optimizations and improve performance. To write efficient and maintainable code in Go, it is important to know the type of a variable. In this article, we will discuss different ways to find the type of a variable in Go. Using fmt.Printf One way to find the type of a variable in Go is to use the Printf function from the fmt package. Printf allows us to format and print values to the ... Read More

287 Views
Golang is a statically typed language, which means that the data types of variables are defined at the time of declaration. It is important to know the type of an object or variable when developing software applications. In this article, we will explore different ways to find the type of an object in Golang. Using the Reflect Package The reflect package in Golang provides a way to inspect the types of variables. The TypeOf function in the reflect package returns a Type object that represents the type of the given value. Example package main import ( ... Read More

770 Views
In Go, converting an integer variable to a string can be accomplished in various ways. There are built-in functions and packages that can be used for this task. This article will explore different ways to convert an integer variable to a string in Go. strconv.Itoa() Function The strconv package provides a function called Itoa() which is used to convert an integer to its string representation. This function takes an integer value as an argument and returns its string representation. Example package main import ( "fmt" "strconv" ) func main() { ... Read More

316 Views
There are different approaches to sort an array containing only two types of elements i.e., only 1’s and 0’s. We will discuss three different approaches to do so. First approach simply uses a predefined sort() function to sort the given array. Second approach is a count sort approach in which we will count the number of zeroes and ones and then update the array by first writing zero for the number of times 0 was counted and then writing 1’s for the number of times we counted one. In the last approach, we used the two pointer method. Problem statement ... Read More

359 Views
We will discuss two approaches to find out how we can express the factorial of a number as the sum of consecutive numbers. First one is a straightforward and simple approach while in the other approach we use the concept of arithmetic progression to make it less complex in terms of time and space occupied. Problem statement We are given a number and we need to find out the number of ways in which we can represent the factorial of the number as a sum of consecutive natural numbers. This involves two different functions − To find the ... Read More

488 Views
This article is about how we can sort an array by neglecting a subarray of elements present in the same array. We will discuss two approaches for the same. The first approach is a brute force approach with time complexity O(n*n) while the second approach is by using an additional space to keep the sorted part of array other than the subarray. The time complexity of second approach is better i.e., O(nlogn). Problem Statement We are given an array of positive integers “nums” and two indices of the same array namely- left and right and we have to partially sort ... Read More

288 Views
In this article, we will learn what an undulating number is and our approaches to check whether a given number is undulating or not using a boolean function to check undulating numbers. Problem statement We will be given a number and our task is to check whether the given number is undulating. Let us first learn about an undulating number; An undulating number is a number that only consists of two types of digits and every second digit is the same. We can say an undulating number is of the form “PQPQPQ” where P and Q are two different digits ... Read More