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 on Trending Technologies
Technical articles with clear explanations and examples
Building an Amazon Keyword Research Tool with Python
Amazon keyword research is a critical step for sellers, marketers, and product teams who want to understand how customers discover products. Keywords influence product titles, descriptions, backend search terms, and advertising performance. Manually researching keywords through the Amazon interface is time-consuming and limited. Results are personalized and location-dependent, making them difficult to analyze at scale. In this tutorial, you'll learn how to build an Amazon keyword research tool using Python that retrieves search results and analyzes recurring keywords. Prerequisites To follow this tutorial, you should have ? Basic knowledge of Python (functions, lists, dictionaries) Python ...
Read MorePython Program to Print Hollow Rectangle pattern
When we start programming, printing different star patterns helps us build our logic and problem-solving skills. One of the easiest and beginner patterns is the hollow rectangle pattern. In this article, we are going to learn how we can print the hollow rectangle pattern using different approaches in Python. What is a Hollow Rectangle Pattern? A hollow rectangle pattern is a rectangle-shaped pattern made of stars where the stars are present only on the boundaries of the rectangle. The rectangle is hollow, meaning the stars are printed only on the borders, while the inner area remains empty ? ...
Read MorePython Program to count nodes in a binary tree
In this article, we are going to learn how we can count the total number of nodes in a binary tree in Python, using different approaches. A binary tree is a data structure in which each node can have at most two children. The two children node of a binary tree are called the left child and the right child. We have to calculate the total number of nodes present in the binary tree. Problem Examples Scenario 1 Input: Binary Tree = 1 2 3 4 5 Output: Total number of nodes: 5 Above-given ...
Read MorePython Program to Rearrange an array such that arr[i] = i
In this problem, we are given an array and we have to rearrange the elements of the array such that for each index i, arr[i] = i. We have to rearrange the elements so that each element is in the position corresponding to its value. Problem Understanding Scenario 1 Input: [3, 0, 2, 1] Output: [0, 1, 2, 3] Element 3 is moved to index 3, element 0 is moved to index 0, element 2 is moved to index 2, and element 1 is moved to index 1. Scenario 2 Input: ...
Read MoreCheck if two numbers are coprime using Python
In this article, we are going to learn how we can check whether two given numbers are coprime in Python using different approaches. What are Coprime Numbers? Two numbers are said to be coprime numbers (also called relatively prime) if they have no common factors other than 1. In other words, their Greatest Common Divisor (GCD) is 1. Examples Example 1: Numbers 2 and 3 The factors of 2 are {1, 2}, the factors of 3 are {1, 3}. Since they have only 1 as a common factor, they are coprime numbers. Input: Number1 ...
Read MorePython Program for finding nth term of H.P.
A Harmonic Progression (H.P.) is a sequence of numbers where the reciprocals of the terms form an Arithmetic Progression (A.P.). In simple terms, if we take the reciprocal of each term in an H.P., the resulting sequence will be in A.P. In this problem, we are given the first term, common difference, and value of n of which we have to find the nth term of given H.P. Formula for nth Term of H.P. To find the nth term of Harmonic Progression, we first convert the H.P. into an A.P. by finding reciprocals of the terms. The formula ...
Read MoreFind the number that appears once, and the other numbers twice in Python
Finding a unique number in a list that appears only once while all other numbers appear twice is a common programming problem. Python provides several approaches to solve this efficiently. The most efficient solution uses the XOR operator, which solves the problem in constant space and linear time complexity. In this article, we'll explore various methods to find the number that appears once while all others appear twice. Problem Understanding Given a list of numbers where every number appears exactly twice except one number that appears only once, we need to find that unique number ? ...
Read MorePython Program for Sum of first N even numbers
The sum of the first N even numbers is a mathematical operation where we add up the first N even numbers. In Python, there are multiple ways to calculate this sum. In this article, we will learn various approaches to finding the sum of the first N even numbers in Python. Understanding the Problem The first N even numbers form a sequence: 2, 4, 6, 8, 10, ... The mathematical formula for finding their sum is: Sum = N * (N + 1) Example: For N=5, the first 5 even numbers are: 2, 4, ...
Read MorePython Program to Calculate nCr and nPr
In combinatorics, nCr and nPr are essential formulas used to calculate combinations and permutations. They represent the number of ways to select and arrange objects from a set. nCr refers to combinations, where order does not matter, while nPr refers to permutations, where order does matter. The permutation refers to the arrangement of objects in a specific order. A combination refers to the selection of objects without taking order in reference. In this article, we are going to learn how we can calculate nCr and nPr in Python using different approaches. Formulas for nCr and nPr The ...
Read MorePython Program to find area of square
A square is a closed two-dimensional figure having 4 equal sides. Each angle of a square is 90 degrees. The area of a square is the space enclosed within its four sides. In this problem, we are given the side of a square, and we have to find the area of the square. In this tutorial, we are going to find the area of a given square in Python using different approaches. Formula The formula to calculate the area of a square is: Area = side × side = side² Examples Example 1 ...
Read More