Calculate Volume and Surface Area of Hemisphere

Vanshika Sood
Updated on 08-Sep-2023 11:34:47

441 Views

A sphere is a three-dimensional geometric shape that is perfectly round like a ball, while a hemisphere is one half of a sphere. In essence, a sphere would split into two hemispheres if it were sliced in half. Hemispheres are identified by their curving surface, which radiates out from the sphere's core. The Greek terms "hemi" (half) and "sphaira" (sphere) are where the name "hemisphere" comes from. Hemispheres are used to describe and simulate a variety of events in a number of disciplines, including geography, astronomy, mathematics, and physics. Volume of a Hemisphere The volume of a hemisphere is equal ... Read More

Leibniz Harmonic Triangle

Vanshika Sood
Updated on 08-Sep-2023 11:19:04

382 Views

The Leibniz harmonic triangle, also known as Leibniz's series or the Leibniz formula, is a triangular arrangement of numbers discovered by German mathematician and philosopher Gottfried Wilhelm Leibniz in the late 17th century. The Leibniz harmonic triangle is a triangular arrangement of fractions. We start at the top with the number and the outermost terms are reciprocal of the natural numbers depicting that particular row number. In general, a term in the leibniz harmonic triangle can be determined by the following equation, where r is the row number and c is the column number with the condition that c

First Occurrence of a Digit in a Given Fraction

Vanshika Sood
Updated on 08-Sep-2023 11:11:02

213 Views

The decimal expansion of a fraction is the decimal representation of the fraction's value. In the following article we discuss two approaches to find the first occurrence of c in a/b. Problem Statement Given three integers a, b, c, locate the first instance of c in the fraction a/b after the decimal point. Print-1 if it does not exist. Sample Examples Input a = 5, b = 6, c = 3 Output 2 Explanation $$\mathrm{\frac{a}{b}=\frac{5}{6}=0.83333}$$ So c=3 occurs at the 2nd place after the decimal point. Hence the output is 2. Input a = -10, b = ... Read More

Minimize the Absolute Difference of Sum of Two Subsets

Vanshika Sood
Updated on 08-Sep-2023 11:06:08

695 Views

To Minimize the Absolute Difference of Sum of Two Subsets, we partition a vector into two subsets i.e. we divide the elements of the vector into two smaller vectors such that each element of the original vector belongs to one of the two smaller vectors, and the two smaller vectors are disjoint. For example, if we have a vector v = {1, 2, 3, 4, 5}, then one possible partitioning of v into two subsets is S1 = {1, 3, 4} and S2 = {2, 5}, where each element of v belongs to either S1 or S2, and the ... Read More

Golang Program to Perform the Comb Sort Algorithm

Akhil Sharma
Updated on 07-Sep-2023 17:52:48

206 Views

Comb sort algorithm is a simple and efficient comparison−based sorting algorithm, Comb Sort improves upon Bubble Sort by eliminating small values towards the end of the array, resulting in faster sorting times. We can use two methods to implement Comb Sort algorithm in Gzolang, the first method is using a naive approach and the other one is using an optimized approach in which we enhance the efficiency of the algorithm by introducing a flag variable to track swaps. In this article, we will discuss the principle of comb sort algorithm and provide the syntax for the program. Explanation The Comb ... Read More

Create Left Positioned Icon Selects Using jQuery Mobile

Aayush Mohan Sinha
Updated on 07-Sep-2023 17:43:34

141 Views

In the contemporary era of technological advancement, interactive interfaces are becoming a crucial element for web designers and developers to incorporate in their projects. One of the most sought-after features in web development is the ability to create personalized and innovative icon selects. The utilization of jQuery Mobile for the creation of such select icons is a popular and intuitive method. In this article, we will explore the method of creating left-positioned icon selects using jQuery Mobile, a tool that enables developers to produce dynamic and responsive web pages with ease. Getting Started With jQuery Mobile Before we dive ... Read More

Create Image Accordion Using HTML and CSS

Aayush Mohan Sinha
Updated on 07-Sep-2023 17:24:04

726 Views

In the domain of web design, discovering groundbreaking methods to exhibit images and other multimedia content is a pivotal facet of developing a captivating user experience. One popular technique that has gained significant traction in recent years is the image accordion, which allows users to easily navigate through a collection of images by expanding and collapsing individual sections. In this article, we will explore the steps required to create an image accordion using HTML and CSS, providing you with a simple yet effective way to enhance the visual appeal of your website. Whether you’re a seasoned web developer or just ... Read More

Iterate Map Elements Using the Range in Go

Akhil Sharma
Updated on 07-Sep-2023 17:15:48

861 Views

Maps in Golang provide a convenient way to store and access the given data in format of key−value pairs. Iterating over a map allows us to process each key−value pair and perform operations on them. In this article, we will explore different methods to iterate map elements using the range, that includes using the range keyword, using keys and values slices, and using the reflect package. Syntax for key, value := range mapName { // Perform operations on key-value pair } This syntax uses the range keyword to iterate over the elements of ... Read More

Create a Copy of the Map in Golang

Akhil Sharma
Updated on 07-Sep-2023 17:12:53

1K+ Views

Maps are reference data types in Golang, which means that assigning one map variable to another creates a reference to the same underlying data structure. To create an independent copy of a map, we need to use different methods. In this article, we will explore two methods that include the manual method and the copy() function method to create a copy of map in golanguage. Syntax newMap := make(map[keyType]valueType) In this syntax, we first declare a new map named newMap using the make() function, specifying the appropriate key and value types. originalMap := map[string]int The syntax originalMap ... Read More

Delete Items of Map in Go

Akhil Sharma
Updated on 07-Sep-2023 17:11:09

5K+ Views

Maps in Go provide a convenient way to store and access data in form of key−value pairs. Deleting items from a map is a common operation when working with dynamic data. In this article, we will delete items of map in golanguage using three methods: the delete() function and iterating over the map, to remove items from a map, and creating a new map based on different conditions. Explanation Maps are versatile structures for holding key−value pairs, and managing these pairs is crucial when dealing with dynamic data. We'll use three approaches to removing items from a map, enhancing ... Read More

Advertisements