Programming Articles - Page 412 of 3363

Java Program to Find Chromatic Index of Cyclic Graphs

Shiva Keerthi
Updated on 10-Apr-2023 16:19:02

224 Views

Chromatic Index of a graph is the parameter which indicates the minimum number of colours needed to colour all the edges of graph such that no two edges sharing the common vertex have same coloured edge. In this article, we will discuss how to find the chromatic index of cyclic graphs using the Java programming language. What is a Cyclic Graph? Cyclic Graph is a graph which consists of at least one cycle path in that particular graph. Cyclic path is a path that starts from a specific node and ends at the same node. What is Graph Colouring? ... Read More

Java Program to Find Common Elements Between Two Arrays

Shiva Keerthi
Updated on 31-May-2024 15:06:05

11K+ Views

We can use different approaches in Java to Find Common Elements between two arrays. We will discuss the approaches, including the basic steps involved, and provide the necessary code to achieve our goal. Whether you are a beginner or an experienced Java programmer, this article will provide you with the tools and knowledge necessary to solve this common programming problem. In this article, we will learn different ways of finding the common elements between two arrays. Examples for Common Elements Between Two Arrays: Example 1: Input: array1 = {4, 2, 3, 1, 6} array2 = {6, 7, 9, ... Read More

Java program to find cube root of a number using binary search

Shiva Keerthi
Updated on 30-Aug-2024 11:41:47

1K+ Views

The cube root of a number is an integer value when multiplied by itself thrice, giving the original number. In this article, we are going to write a Java program to find the cube root of a number using binary search. Finding the cube root of a number is one of the applications of the binary search algorithm. We will discuss in detail how we calculate the cube root using a binary search algorithm in Java. Problem Statement Write a Java program to find the cube root of a number using Binary Search − Input 1 64 Output 1 4 ... Read More

Java Program to Find Area of circle Using Method Overloading

Shiva Keerthi
Updated on 09-Jul-2024 12:23:14

2K+ Views

We can calculate the area of the circle in Java using Method Overloading. “Method Overloading” is a feature in Java that allows one to write more than one method in the same class using the same method name. It will enable us to declare more than one method with the same names but with different signatures i.e., the number of parameters in the method may be different or the datatype of parameters may be different. Now, let us achieve Method Overloading in Java by considering the “area of a circle” as an example. Before moving to an example, now ... Read More

How to Create and Customize Venn Diagrams in Python?

Manthan Ghasadiya
Updated on 10-Apr-2023 13:39:30

1K+ Views

Venn diagrams are diagrams used to represent the relationships between sets. To create Venn diagrams, we are going to use matplotlib. Matplotlib is a popular data visualization library used in Python to create interactive plots and charts. It is also used to make interactive figures and diagrams. Matplotlib provides a number of functions to customize plots and diagrams. In this tutorial, we will illustrate three examples to customize Venn diagrams. Example Here’s a simple example that creates an intersection of two Venn diagrams; first, we imported necessary libraries and imported venns. Then we created data sets as Python ... Read More

How to create an ogive graph in python?

Manthan Ghasadiya
Updated on 10-Apr-2023 13:37:43

622 Views

An ogive graph graphically represents the cumulative distribution function (CDF) of a set of data, sometimes referred to as a cumulative frequency curve. It is applied to examine data distribution and spot patterns and trends. Matplotlib, Pandas, and Numpy are just a few of the libraries and tools offered by Python to create ogive graphs. In this tutorial, we'll look at how to use Matplotlib to generate an ogive graph in Python. To create an ogive graph, we need to import the required libraries. In this example, we will use Matplotlib, Pandas, and Numpy. Matplotlib is a popular data visualization ... Read More

How to create BMI calculator web app using Python and PyWebio?

Manthan Ghasadiya
Updated on 10-Apr-2023 12:54:51

652 Views

PyWebio is a python library that can be used to build web applications that require simpler UI. It provides several functions to create a simple web browser. Anyone can build simple web applications using PyWebio without prior knowledge of HTML and JavaScript. This tutorial will illustrate two methods to create a web to calculate BMI. Body mass index (BMI) measures body fat based on weight and height. It is commonly used to determine whether a person is underweight, normal, overweight, or obese. Example In this example, we define a ‘BMICalculator’ class that contains all the methods needed to calculate ... Read More

How to Create a Sequence of Linearly Increasing Values with NumPy Arrange?

Manthan Ghasadiya
Updated on 10-Aug-2023 15:57:18

588 Views

NumPy is a Python library widely used for numerical computations and scientific data analysis. One of the most commonly used functions of NumPy is ‘numpy.arange()’, which creates a sequence of linearly increasing values with a given start, stop, and step size. In this tutorial, we'll examine how to use ‘numpy.arange()’ to produce a sequence of linearly increasing values. We will illustrate three examples of linearly arranged values with different steps. In this tutorial, we will learn to create a sequence of linearly increasing values with a NumPy arrange. We will be using NumPy, which is a famous python library. ... Read More

Check If the Rune is a Letter or not in Golang

Sabid Ansari
Updated on 07-Apr-2023 11:14:29

2K+ Views

There is built-in support for Unicode, including its rune type, in the statically-typed computer language Go. A Unicode code point is represented by a rune, which is the equivalent for the int32 type. There are various methods for determining if a rune is a letter or not in the Go language. In this article, we'll explore how to check if a rune is a letter or not in Go, and we'll provide examples of how to do that using different techniques. Why do we need to check If a Rune is a Letter? A rune in Go is a Unicode ... Read More

Delete Elements in a Slice in Golang

Sabid Ansari
Updated on 07-Apr-2023 11:12:13

13K+ Views

Slices in Golang are dynamically-sized sequences that provide a more powerful interface than arrays. They are commonly used for storing collections of related data. Sometimes, we may want to delete elements from a slice. In this article, we will discuss how to delete elements in a slice in Golang. Deleting Elements in a Slice In Golang, we can delete elements from a slice using the built-in append() function. Here's how it works − ExampleHere's an example of how to use the deleteElement() function to delete an element from a slice −package main import "fmt" func deleteElement(slice []int, index ... Read More

Advertisements