Found 10483 Articles for Web Development

How to Improve Website Architecture in 8 Easy Ways?

Biswaindu Parida
Updated on 31-Mar-2023 15:38:03

188 Views

In simple terms, website architecture is the visual and technical structure of the website. Web designers generally use the term while planning, designing, and developing a website. Technically, a website architecture is a logical website layout created per the user and business requirements. It is a collection of components that comprise a website and its services to the user. You can classify the components of website architecture into four parts Visual − It includes the user interface, buttons, colors, and other visual elements. Functional − It includes the type of services the website will provide. Technical − It ... Read More

JavaScript Program for Maximum and Minimum in a Square Matrix

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

313 Views

To get maximum and minimum in a Square Matrix in JavaScript, we will be discussing two different approaches, their complexities, and example codes. First approach make use of nested loop while second approach uses Math function. In this article we are having a 2D square matrix, our task is to write a JavaScript program for maximum and minimum in a square matrix. Example Input: Matrix: [ [1, 3, 7], [5, 2, 9], [2, 5, 1] ] Output: Maximum = 9, Minimum = 1 ... Read More

JavaScript Program for Maximum Sum of i*arr[i] Among all Rotations of a Given Array

Prabhdeep Singh
Updated on 30-Mar-2023 11:46:07

270 Views

In this article, we will implement the JavaScript program for the Maximum sum of i*arr[i] among all the rotations of the given array. Here i*arr[i] expression indicates that we have to maximize the sum of all the elements of the array by taking the product of them with the current position. We can rotate the given array elements in the left of the right position to get the maximum answer. For this problem, we will see a complete code and a deep explanation. Introduction to Problem In this problem, we are given an array and if we multiply all the ... Read More

JavaScript Program for Maximum Product Subarray

Prabhdeep Singh
Updated on 30-Mar-2023 11:44:39

369 Views

A subarray is part of an array formed by removing some or no prefixes of the array and removing some or no suffix elements of the given array. We will try to find the subarray that will contain the elements, and by multiplying all of them, we can get the maximum value. We will implement the code with the explanation. In this article, we will implement a JavaScript program for the Maximum product subarray. Introduction to Problem In this problem, we are given an array and we have to pick any subarray from the given array, but the issue is ... Read More

JavaScript Program for Maximize Elements Using Another Array

Prabhdeep Singh
Updated on 30-Mar-2023 11:42:46

233 Views

In this article, we are going to implement a JavaScript program for Maximizing elements using another array. We are given two arrays and have to pick some elements from the second array and replace the elements of the first array. We will see the complete code to implement the concepts that will be discussed. Introduction to Problem In this problem, we are given two arrays and we have to make all the elements of the first array maximum as possible or simply we have to make the sum of all elements of the first array maximum. We can pick elements ... Read More

JavaScript Program for Markov Matrix

Prabhdeep Singh
Updated on 30-Mar-2023 11:40:36

189 Views

A matrix is a kind of 2-D array, which is in the form of some number of rows, and for each row, there is the same number of columns and by the row and column number, we can get the element at any particular index. For the Markov matrix, each row's sum must equal 1. We are going to implement a code to create a new Markov matrix and find if the currently given matrix is a Markov matrix or not. Introduction to Problem In the given problem, we have to write a code that will produce the Markov ... Read More

JavaScript Program for Longest Subsequence of a Number having Same Left and Right Rotation

Prabhdeep Singh
Updated on 30-Mar-2023 11:37:09

215 Views

We will implement a code to find the longest subsequence of a given number that has the same left and right rotation in the JavaScript programming language. The left and right rotation of a given number means, for left rotation we have to move the left-most digit of the number to the end position or the rightmost position. Similarly, for the right rotation, we have to move the right-most digit of the number to the first position or the leftmost position. We will see the complete code with the implementation. Introduction to Problem In this problem, we are given a ... Read More

JavaScript Program for Left Rotation and Right Rotation of a String

Shriansh Kumar
Updated on 21-Jan-2025 12:53:37

1K+ Views

To implement left rotation and right rotation of a string, we can use various approaches to implement this problem. Left rotation of a string means anti-clockwise movement of the given number of characters and right rotation of the string means clockwise movement of the given number of characters. In this article we are having a string and a value of k by which we will rotate the string. Our task is to write a JavaScript program for left rotation and right rotation of a string. Example Input: String str = "apple"; k = 3 Output: Left Rotation: ... Read More

JavaScript Program for the Least Frequent Element in an Array

Prabhdeep Singh
Updated on 30-Mar-2023 11:33:39

693 Views

In this program, we are given an array of integers or elements and we have to return the element which presents the least numbers of the time in the array, and if there is more than one least frequent number present we can return any one of them which we are going to see in the article below. Introduction to Problem In the given problem we have to find the least frequent element in an array. Here we have given an array with duplicate numbers and here we have to count the occurrence of each element and among all of ... Read More

JavaScript Program for the Last duplicate element in a Sorted Array

Prabhdeep Singh
Updated on 27-Dec-2024 19:16:44

421 Views

In this article, we are going to explore a Javascript program that works with a sorted array containing duplicate elements. The task is to traverse the array using a loop and identify both the index of the last duplicate element and the duplicate number.  Introduction to Problem In the given problem we have to find the last duplicate element in a sorted array. Duplicate means the number is present more than one time. Example − Input arr[] = {1, 2, 2, 3, 5, 5, 6, 7} Output Last index: 5 Last duplicate value: 5 From the above given sorted array, ... Read More

Advertisements