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
Add all greater values to every node in a given BST?
In this problem, we need to modify each node in a Binary Search Tree (BST) by adding the sum of all greater node values to the current node's value. This transforms the BST while maintaining its structure but changing the node values. Syntax void addGreaterValues(struct Node* root, int* sum); Problem Statement Given a Binary Search Tree, we need to add to each node the sum of all node values that are greater than the current node value. Input BST 10 5 ...
Read MoreRole of size property in CSS to set the size and orientation of a page box
The CSS size property specifies the size and orientation of a page box when printing. This property is primarily used within @page rules to control how content appears on printed pages. Syntax @page { size: value; } Possible Values ValueDescription autoThe page box will be set to the size and orientation of the target sheet landscapeOverrides the target's orientation. The longer sides are horizontal portraitOverrides the target's orientation. The shorter sides are horizontal lengthCreates an absolute page box with specified dimensions. One value sets both width and height ...
Read MoreAdd 1 to a number represented as a linked list?
The linked list representation of a number stores each digit in a separate node, where the first node contains the most significant digit and the last node contains the least significant digit. For example, the number 202345 is represented as (2→0→2→3→4→5). To add 1 to this linked list represented number, we need to handle carry propagation from the least significant digit. If the last digit is less than 9, we simply increment it. Otherwise, we propagate the carry to the next digits. Syntax struct Node* addOne(struct Node* head); Algorithm The algorithm follows these ...
Read MoreFade In Left Big Animation Effect with CSS
The CSS Fade In Left Big animation effect creates a dramatic entrance animation where an element slides in from the far left while simultaneously fading in from transparent to opaque. This effect uses translateX(-2000px) to start the element off-screen. Syntax @keyframes fadeInLeftBig { 0% { opacity: 0; transform: translateX(-2000px); } 100% { opacity: 1; ...
Read MoreFade In Down Animation Effect with CSS
The CSS Fade In Down animation effect creates a smooth transition where an element gradually appears while moving downward from its starting position. This animation combines opacity changes with vertical translation to create an elegant entrance effect. Syntax @keyframes fadeInDown { 0% { opacity: 0; transform: translateY(-distance); } 100% { opacity: 1; transform: ...
Read MoreA Number Link Game?
Number Link is a logic puzzle where players must connect matching numbers on a grid using continuous paths. The paths cannot cross or branch, and each number must be at the endpoint of exactly one path. This implementation generates a random Number Link puzzle and its solution using a union-find data structure. Syntax struct _node { struct _node *parent; int rank; int path_number; int endpoint; }; Algorithm Overview The algorithm works by generating random paths first, then creating ...
Read MoreFade In Left Animation Effect with CSS
The CSS Fade In Left animation effect creates a smooth transition where an element slides in from the left while gradually becoming visible. This animation combines opacity changes with horizontal movement to create an elegant entrance effect. Syntax @keyframes fadeInLeft { 0% { opacity: 0; transform: translateX(-20px); } 100% { opacity: 1; transform: ...
Read MoreC program to calculate the value of nPr?
Permutations, nPr can also be represented as P(n, r), is a mathematical formula to find the number of ways to arrange r objects from n objects where order matters. The formula of P(n, r) is n! / (n − r)!. The number of permutations on a set of n elements is given by n! where "!" represents factorial. Syntax nPr = n! / (n - r)! Where: n is the total number of objects r is the number of objects to be selected ! denotes factorial Example Let's calculate P(5, ...
Read MoreWhat is a page box in CSS?
A page box in CSS is a rectangular area that defines the printable region of a page when creating print stylesheets. It consists of the page area (where content appears) and the margin area around it. Page boxes are defined using the @page rule and allow you to control page dimensions, orientation, margins, and printing marks. Syntax @page { size: width height; margin: value; marks: crop | cross | none; } Page Box Properties PropertyDescription sizeSets the page box dimensions and ...
Read MoreC program to Find the Largest Number Among Three Numbers
This program takes three numbers and finds the largest among them. We will use conditional statements to compare the numbers and determine which one has the maximum value. Syntax if (condition1) { if (condition2) { // statements } else { // statements } } else { if (condition3) { // statements } else ...
Read More