Find common elements in three sorted arrays by dictionary intersection in Python

Pradeep Elance
Updated on 15-Mar-2026 18:24:53

407 Views

When working with Python data manipulation, you may need to find elements that are common among multiple arrays. This can be efficiently achieved by converting arrays into dictionaries using the Counter class from the collections module. The approach involves using Counter to count occurrences of each element, then finding the intersection using the & operator. This method preserves the minimum count of common elements across all arrays. Using Counter and Dictionary Intersection Here's how to find common elements using dictionary intersection ? from collections import Counter arrayA = ['Sun', 12, 14, 11, 34] arrayB ... Read More

How to Create Facebook Login Page in HTML and CSS

AYUSH MISHRA
Updated on 15-Mar-2026 18:24:36

268 Views

HTML stands for Hyper Text Markup language that is used to create the structure or layout of any webpage. CSS stands for cascading style sheets that are used to format and add styles to web pages. In this article, we are going to discuss how we can create a Facebook login page using HTML and CSS. Facebook Login Page A login page is the first page of any application or website. If we had already created our account on any website or app then we enter our login credentials on the login page to access our account. The ... Read More

Find all triplets in a list with given sum in Python

Pradeep Elance
Updated on 15-Mar-2026 18:24:34

1K+ Views

In a list of numbers we want to find out which three elements can join to give a certain sum. We call it a triplet. And in the list there can be many such triplets. For example, the sum 10 can be generated from numbers 1, 6, 3 as well as 1, 5, 4. In this article we will see how to find out all such triplets from a given list of numbers. Using Nested Loops with Set This approach uses nested loops with a set to efficiently find triplets. We iterate through the list, and for each ... Read More

How to Make the CSS overflow: hidden Work on a Element?

Shefali Jangid
Updated on 15-Mar-2026 18:24:16

700 Views

The CSS overflow: hidden property is used to hide content that extends beyond the boundaries of an element. However, for it to work effectively, especially on table cells, you need to combine it with other CSS properties to control how the content is displayed. Syntax selector { overflow: hidden; } Approaches to Make the CSS overflow: hidden Work Using table-layout: fixed Property Using text-overflow and white-space Properties Method 1: Using table-layout: fixed Property By default, tables adjust column ... Read More

Find all possible substrings after deleting k characters in Python

Pradeep Elance
Updated on 15-Mar-2026 18:24:15

269 Views

Sometimes we need to find all possible substrings after deleting exactly k characters from a string. This means keeping n-k characters in their original order to form new substrings. Python provides multiple approaches to solve this problem efficiently. Using Loops and Recursion This approach uses recursion to generate all combinations by selecting characters at different positions. We track the start and end positions while building each substring ? def letterCombinations(s, temp, start, end, index, k): result = [] if index == k: ... Read More

How to Create an SVG Drop Shadow?

Pankaj Kumar Bind
Updated on 15-Mar-2026 18:23:57

708 Views

A drop shadow enhances the appearance of an SVG by giving it a 3D effect or a sense of depth. SVG drop shadows can be created using SVG filters and the CSS filter property. SVG Filters: Provides fine-grained control over shadow properties. CSS filter: Applies shadows using simpler syntax. Syntax For SVG filters − For CSS filter − filter: drop-shadow(x-offset y-offset blur color); Method 1: Using the Element in SVG ... Read More

Find all distinct pairs with difference equal to k in Python

Pradeep Elance
Updated on 15-Mar-2026 18:23:53

491 Views

In this article, we will learn how to find all distinct pairs of numbers in a list where the absolute difference between the two numbers equals a given value k. We'll explore different approaches to solve this problem efficiently. Using Nested for Loops This approach uses two nested for loops to compare every possible pair of elements in the list. The outer loop visits each element, while the inner loop compares it with all remaining elements ? numbers = [5, 3, 7, 2, 9] k = 2 count = 0 # Check all possible pairs ... Read More

How to Create a Blinking Effect with CSS3 Animations?

Pankaj Kumar Bind
Updated on 15-Mar-2026 18:23:40

1K+ Views

To create a blinking effect with CSS3 animations, there are several approaches you can use. Blinking effects are commonly used to draw attention to specific elements on a webpage, such as warning messages, buttons, or text. CSS3 animations make it easy to implement such effects with clean and reusable code. Syntax @keyframes animation-name { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } } selector { animation: animation-name duration timing-function iteration-count; } ... Read More

Extracting rows using Pandas .iloc[] in Python

Pradeep Elance
Updated on 15-Mar-2026 18:23:33

805 Views

Pandas is a powerful Python library extensively used for data processing and analysis. The .iloc[] method allows you to select rows and columns from a DataFrame using integer-based indexing, making it perfect for positional data extraction. The iloc method uses zero-based indexing where the first row has index 0, second row has index 1, and so on. Similarly, columns are indexed starting from 0. Syntax DataFrame.iloc[row_indexer, column_indexer] Creating Sample Data Let's create a sample DataFrame to demonstrate iloc functionality ? import pandas as pd # Create sample DataFrame data = ... Read More

How to Make CSS Ellipsis Work on a Table Cell?

Pankaj Kumar Bind
Updated on 15-Mar-2026 18:23:18

688 Views

When dealing with long text in a table, ensuring that it doesn't overflow and ruin your layout is crucial. CSS provides solutions to add ellipses (...) to text that exceeds a cell's width, keeping your UI clean and readable. This article explores two approaches: using the display property and the table-layout property. Syntax /* Basic ellipsis properties */ selector { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: value; } Method 1: Using the Display Property The display property ... Read More

Advertisements