Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Dr Ruqaiya Khanam
Page 2 of 2
How to make Density Plot in Python with Altair?
Altair is a statistical visualization library in Python based on Vega-Lite grammar. Density plots are useful for visualizing data distribution, comparing groups, and detecting outliers. This article demonstrates how to create density plots using Altair with a practical example. What is a Density Plot? A density plot shows the distribution of a continuous variable by estimating the probability density function. It's similar to a histogram but uses a smooth curve instead of bars. Required Libraries First, let's import the necessary libraries ? import altair as alt import pandas as pd Loading Sample ...
Read MorePython program to find XOR of array elements which are divisible by given number
In this article, we will discuss how to compute the XOR of array elements that are divisible by a given number. The XOR (exclusive OR) is a binary operation that compares the bits of two operands. If the bits are different then it returns 1, whereas it returns 0 if the bits are the same. Understanding XOR Operation Let's understand XOR with a simple example using array [1, 2, 3, 4, 5] ? Initialize xor_value to 0. Begin iterating over each element: First element num = 1, perform xor_value ^ num. Since xor_value = 0, ...
Read MorePython Program to find Jumbo GCD Subarray
The Jumbo GCD Subarray problem involves finding the Greatest Common Divisor (GCD) of a subarray with maximum possible value from a given array. The GCD is the largest positive integer that divides all numbers in a set without remainder. We can solve this using two approaches: brute force and optimized using prefix/suffix arrays. Understanding GCD Before solving the problem, let's implement a helper function to calculate GCD using the Euclidean algorithm ? def gcd(a, b): while b: a, b = b, a % b ...
Read More