Dr Ruqaiya Khanam

Dr Ruqaiya Khanam

13 Articles Published

Articles by Dr Ruqaiya Khanam

Page 2 of 2

How to make Density Plot in Python with Altair?

Dr Ruqaiya Khanam
Dr Ruqaiya Khanam
Updated on 27-Mar-2026 475 Views

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 More

Python program to find XOR of array elements which are divisible by given number

Dr Ruqaiya Khanam
Dr Ruqaiya Khanam
Updated on 27-Mar-2026 421 Views

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 More

Python Program to find Jumbo GCD Subarray

Dr Ruqaiya Khanam
Dr Ruqaiya Khanam
Updated on 27-Mar-2026 228 Views

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
Showing 11–13 of 13 articles
« Prev 1 2 Next »
Advertisements