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
How to specify the number of columns an element should be divided into with CSS
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 MoreMaximum absolute difference of value and index sums in C
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 MoreAudit Documentation
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 MoreCenter pagination on a web page with CSS
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 MoreDifferent ways to declare variable as constant in C and C++
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 MoreCSS Grid Gaps
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 MoreMaximum distance between two occurrences of same element in array in C
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 MoreCSS Grid Rows
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 MoreMaximum number of characters between any two same character in a string in C
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 MoreMaximum number of chocolates to be distributed equally among k students in C
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