Found 10483 Articles for Web Development

JavaScript Program for Pairwise Swapping Elements of a Given Linked List

Aishwarya Mani Tripathi
Updated on 02-May-2023 17:43:24

228 Views

In this tutorial, we are going to learn about a JavaScript Program for Pairwise Swapping Elements of a Given Linked List. One common operation on linked lists is swapping adjacent elements in pairs. This operation can be useful in various scenarios, such as reorganizing data, rearranging elements in a specific order, or optimizing certain algorithms. Also, we will focus on solving the problem of pairwise swapping elements in a given linked list using JavaScript. We will provide a step-by-step approach to implementing the algorithm, explaining the logic and code behind it. By the end of this tutorial, you will have ... Read More

JavaScript Program for Pairs such that one is a power multiple of other

Aishwarya Mani Tripathi
Updated on 02-May-2023 17:41:58

158 Views

JavaScript Program for pairs such that one is a power multiple of the other is a problem that involves finding pairs of numbers such that one number is a power multiple of the other. In this tutorial, we will be discussing how to write a JavaScript program to solve this problem. We will be exploring various approaches and algorithms to find these pairs efficiently. Additionally, we will also be discussing the time and space complexity of these algorithms to provide a comprehensive understanding of the topic. So, let's dive in and learn how to write a JavaScript program to find ... Read More

JavaScript Program for Number of unique triplets whose XOR is zero

Aishwarya Mani Tripathi
Updated on 02-May-2023 17:39:10

412 Views

JavaScript Program for the Number of unique triplets whose XOR is zero is a common programming problem that requires finding the number of unique triplets in a given array whose XOR is equal to zero. The XOR operation is a bitwise operator that takes two bits and returns 1 if the bits are different, and 0 if they are the same. In this problem, we need to find all possible combinations of three numbers in the array, where the XOR of the triplet is zero. This problem can be solved using various approaches, including brute force, hashing, and sorting. In ... Read More

JavaScript Program for Number of Local Extrema in an Array

Ravi Ranjan
Updated on 09-Jun-2025 19:15:46

246 Views

JavaScript Program for the Number of local extrema in an array is a common problem in the field of computer science and data analysis. Local extrema are the peaks and valleys in a sequence of numbers. In this article we are having two arrays, our task is to write a Javascript program for number of local extrema in an array. Example Input: arr1 = [1, 2, 3, 2, 1, 4, 5, 6, 5, 4, 3, 2, 1]; First local extrema: 3, {2 < 3 > 2} Second local extrema: 1, {2 > 1 < 4} Third local ... Read More

JavaScript Program for Mirror of Matrix Across Diagonal

Ravi Ranjan
Updated on 06-Jun-2025 19:14:12

401 Views

To write a javascript program for mirror of matrix across diagonal, we will be discussing two approaches with their code example and explanation of code. In this article we are having a 2D matrix. Our task is to write a JavaScript program for mirror of matrix across diagonal. Example Input: matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] Output: [[1, 4, 7], [2, 5, 8], [3, 6, 9]] Approaches ... Read More

JavaScript program for Minimum Product Subset of an Array

Aishwarya Mani Tripathi
Updated on 02-May-2023 17:09:03

247 Views

JavaScript Program for Minimum product subset of an array is a common problem that arises in the field of computer science and programming. The problem statement requires us to find the minimum product that can be obtained from any subset of the given array. A minimum product subset of an array is a subset of array elements that yields the smallest possible product. Several algorithms are available for identifying this subset, including dynamic programming, greedy algorithms, and branch and bound. The selection of the algorithm is determined by the particular constraints and specifications of the problem at hand. In this ... Read More

How to specify order of classes using CSS?

Riya Kumari
Updated on 02-May-2023 16:15:11

1K+ Views

Cascading Style Sheets (CSS) is a powerful component of web development which enables the developers to determine the visual appearance of their websites. In CSS, classes are used as selectors which enables us to apply several specific styles to an element. You can also use multiple classes for a particular element. However, when you apply multiple classes to an element, it is necessary to know how to specify the order of these classes in which they will be rendered to avoid discrepancies and unexpected results. In this article, we will discuss different methods to specify the order of classes ... Read More

How to create Paradoxical effect using CSS?

Riya Kumari
Updated on 02-May-2023 16:10:57

563 Views

The Paradoxical effect is a visual effect which is used to create optical illusion of any object, element or text that appears to move in a contradictory way. This effect can be used to add interesting and unique element to your web page. This can be easily created using HTML and CSS. In this article, we will discuss about the techniques and properties which is required for creating Paradoxical effect using CSS. We will start creating simple paradoxes using combination of two CSS properties simultaneously, and then dive into more advanced techniques which enables us to create complex paradoxical ... Read More

How to apply multiple transform property to an element using CSS?

Riya Kumari
Updated on 04-Sep-2024 16:55:22

5K+ Views

To apply multiple transform property to an element using CSS, we will be using two different methods which uses transformation property. In first approach we will be using two function of transform property whereas in second method we will be using nested class to apply different transformations. In this article, we are having a container with background image and our task is to apply multiple transform property to an element using CSS. Methods to Apply Multiple Transform to an Element Applying Multiple Transform Values Applying Multiple Transformation using Nesting of ... Read More

How to align flexbox columns left and right using CSS?

Riya Kumari
Updated on 23-Jul-2024 16:17:47

21K+ Views

To align flexbox columns left and right using CSS, we can use various flexbox properties. In this article, we will learn and understand three different approaches to exaplain how to align flexbox columns left and right using CSS. We have created two flexible columns using div and flexbox, our task is to align flexible columns to left and right using CSS. Approaches to Align flexbox Columns Left and Right Here is a list of approaches to align flexbox columns left and right using CSS which we will be discussing in this article with stepwise explaination and complete example codes. ... Read More

Advertisements