Articles on Trending Technologies

Technical articles with clear explanations and examples

How to specify the number of columns an element should be divided into with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 311 Views

The CSS column-count property is used to specify the number of columns an element should be divided into. This property enables you to create newspaper-style multi-column layouts for text content. Syntax selector { column-count: value; } Possible Values ValueDescription autoDefault value. Number of columns determined by other properties numberPositive integer specifying the number of columns Example: Creating 4 Columns The following example demonstrates how to divide text content into 4 columns − .demo { ...

Read More

Maximum absolute difference of value and index sums in C

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 1K+ Views

We are given an array of integers. The task is to calculate the maximum absolute difference of value and index sums. That is for each pair of indexes (i, j) in an array, we have to calculate |Arr[i] - Arr[j]| + |i - j| and find the maximum such sum possible. Here |A| means absolute value of A. Syntax int maxAbsDiff(int arr[], int n); // Returns maximum value of |arr[i] - arr[j]| + |i - j| for all pairs (i, j) Example 1: Finding Maximum Absolute Difference Let's implement the brute force approach to ...

Read More

Audit Documentation

Praveen Varghese Thomas
Praveen Varghese Thomas
Updated on 15-Mar-2026 1K+ Views

Audit documentation refers to the comprehensive written records, working papers, and evidence created during the audit process. It serves as proof of the auditor's work performed and supports the conclusions and opinions expressed in the audit report. Key Components of Audit Documentation Audit documentation includes all records that demonstrate the auditor's compliance with auditing standards and provide evidence for audit conclusions. These documents must be complete, accurate, and maintained according to professional standards. Audit ...

Read More

Center pagination on a web page with CSS

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 895 Views

Centering pagination on a web page involves creating a horizontal pagination bar and aligning it to the center of its container. This is commonly achieved using the text-align: center property on the parent container and display: inline-block on the pagination element. Syntax .pagination-container { text-align: center; } .pagination { display: inline-block; } Example The following example demonstrates how to create a centered pagination bar with styled navigation links − ...

Read More

Different ways to declare variable as constant in C and C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 1K+ Views

In C programming, constants are fixed values that cannot be changed during program execution. There are multiple ways to declare variables as constants, each with its own characteristics and use cases. Syntax const data_type variable_name = value; #define MACRO_NAME value enum { constant1, constant2, ... }; Method 1: Using const Keyword The const keyword is the most common way to create read-only variables. Once declared, attempting to modify the value results in a compilation error − #include int main() { const int value = 5; ...

Read More

CSS Grid Gaps

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 150 Views

The CSS Grid layout allows you to create gaps between rows and columns in a grid container. These gaps provide spacing between grid items, making your layout more visually appealing and easier to read. Column Gap Row Gap ...

Read More

Maximum distance between two occurrences of same element in array in C

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 2K+ Views

In this problem, we need to find the maximum distance between two occurrences of the same element in an array. The distance is calculated as the number of elements between the first and last occurrence of any repeating element. Syntax int maxDistance(int arr[], int n); Algorithm Traverse each element of the array For each element, find its last occurrence in the remaining array Calculate the distance between first and last occurrence (j - i - 1) Keep track of the maximum distance found Return -1 if no repeating elements exist Example ...

Read More

CSS Grid Rows

Rishi Rathor
Rishi Rathor
Updated on 15-Mar-2026 157 Views

CSS Grid rows refer to the horizontal tracks in a CSS grid container. They define the horizontal space where grid items are placed and can be explicitly defined using the grid-template-rows property. Row ...

Read More

Maximum number of characters between any two same character in a string in C

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 1K+ Views

We are given a string of alphabets. The array can have at least two occurrences of the same character. The task here is to find the maximum number of characters between any two occurrences of a character. If there is no repetition of any character then return -1. Input − string str = "abcdba" Output − Maximum number of characters between any two same character in a string − 4 Explanation − The repeating characters are 'a' and 'b' only with indexes − 1. 'a' first index 0 last 5, characters in between 5-0-1=4 2. 'b' ...

Read More

Maximum number of chocolates to be distributed equally among k students in C

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 1K+ Views

We are given chocolates in consecutive boxes represented as an array and k students among which these chocolates will be distributed. The task is to find consecutive boxes such that the sum of chocolates can be equally distributed among k students with maximum chocolates per student. This problem requires finding the maximum sum subarray whose sum is divisible by k. We traverse all possible subarrays, check if their sum is divisible by k, and track the maximum such sum. Syntax int maxChocolates(int arr[], int n, int k); Algorithm Iterate through all possible ...

Read More
Showing 20931–20940 of 61,297 articles
Advertisements