Given a 2D matrix, the challenge is to find and print the corner elements along with their sum. In a matrix, corner elements are located at the four corners: top-left, top-right, bottom-left, and bottom-right positions. For a matrix mat[r][c] with rows from 0 to r-1 and columns from 0 to c-1, the corner elements are: mat[0][0], mat[0][c-1], mat[r-1][0], and mat[r-1][c-1]. The task is to extract these corner elements and calculate their sum. Syntax // Corner elements of a matrix mat[r][c] mat[0][0] // Top-left corner mat[0][c-1] ... Read More
The CSS wave effect is a legacy filter that was used to create sine wave distortions on elements, giving them a wavy appearance. This filter was primarily supported in Internet Explorer and is now obsolete. Modern CSS uses alternative techniques like transforms and animations to achieve wave effects. Syntax selector { filter: Wave(Add=value, Freq=value, LightStrength=value, Phase=value, Strength=value); } Parameters ParameterDescription AddA value of 1 adds the original image to the waved image, 0 does not FreqThe number of waves LightStrengthThe strength of the light on the wave (from 0 ... Read More
Given four variables a, b, c, d with predefined values that represent different types of bracket pairs. The task is to use all the given brackets and print a balanced bracket expression using these bracket types. Where variables represent − a for (( b for () c for )( d for )) If we cannot form a balanced bracket expression then print "can't be formed". In case of multiple valid answers, we can print any of them. Syntax void print(int a, int b, int c, int d); Algorithm To ... Read More
The CSS filter: invert() property is used to map the colors of an element to their opposite values in the color spectrum, creating a negative image effect similar to film negatives. Syntax selector { filter: invert(percentage); } Possible Values Value Description 0% No inversion (default) 100% Complete color inversion 50% Gray appearance Example: Image Invert Effect The following example applies an invert filter to an image − .original ... Read More
The CSS Flip Out X animation effect creates a 3D flipping motion where an element rotates around its horizontal (X) axis and fades out simultaneously. This animation is commonly used for exit transitions and interactive UI elements. Syntax @keyframes flipOutX { 0% { transform: perspective(400px) rotateX(0deg); opacity: 1; } 100% { transform: perspective(400px) rotateX(90deg); ... Read More
Given an array with elements and the task is to print the last occurrences of the given elements in the list. Here we not only have to remove the duplicate elements but also we have to maintain the order of the occurrences of the elements in an array as per the last time they have occurred. For example, if we have an array of 6 elements containing some duplicate values i.e., {1, 3, 2, 3, 1, 2}, the result should be in the form of 3 1 2. Syntax void printLastOccurrence(int arr[], int n); ... Read More
The CSS speech-rate property controls the speed at which content is spoken by screen readers and other speech synthesis applications. This property is part of the CSS Speech Module and helps create more accessible web content. Syntax selector { speech-rate: value; } Possible Values ValueDescription numberSpecifies the speaking rate in words per minute x-slowSame as 80 words per minute slowSame as 120 words per minute mediumSame as 180-200 words per minute (default) fastSame as 300 words per minute x-fastSame as 500 words per minute fasterAdds 40 words per minute ... Read More
The task is to print the nodes of a linked list in reverse order without using extra space and without modifying the original linked list. This approach maintains O(1) space complexity by counting nodes and accessing them by position rather than using recursion or additional data structures. 10 21 33 42 89 ... Read More
The CSS Flip In X animation effect creates a 3D flipping motion where an element rotates along the X-axis while appearing on the page. This animation starts with the element rotated 90 degrees and invisible, then flips into view with a bouncing effect. Syntax @keyframes flipInX { 0% { transform: perspective(400px) rotateX(90deg); opacity: 0; } 40% { transform: perspective(400px) rotateX(-10deg); } 70% { transform: perspective(400px) rotateX(10deg); } 100% { transform: perspective(400px) rotateX(0deg); opacity: 1; } } .flipInX { ... Read More
The CSS cue property is a shorthand for setting cue-before and cue-after properties. It allows you to specify audio cues that play before and after an element's content when using speech synthesis or screen readers. Syntax selector { cue: cue-before cue-after; /* or */ cue: single-value; } Possible Values ValueDescription url()Specifies an audio file to play as a cue noneNo audio cue is played (default) inheritInherits the value from parent element Example: Setting Audio Cues The following example ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Economics & Finance