Shubham Vora

Shubham Vora

793 Articles Published

Articles by Shubham Vora

793 articles

Java program for longest subsequence of a number having same left and right rotation

Shubham Vora
Shubham Vora
Updated on 23-Jan-2025 299 Views

In this tutorial, we will learn how to find the maximum length of the subsequence having the same left and right rotations in Java. We find the maximum length of such subsequence. Finding the longest subsequence with identical or alternating digits We will solve the problem based on a particular observation. The strings can only have the same left and right rotations if all digits of strings are equal or it contains the two digits alternatively, and the string length is even. Step 1: Initialize Variables: Initialize the len variable with the string length and ...

Read More

How can I round a number to 1 decimal place in JavaScript?

Shubham Vora
Shubham Vora
Updated on 26-Dec-2024 34K+ Views

In this tutorial, we will learn to round a number to a one decimal place in JavaScript. There are various needs to round the float numbers and show particular digits after the decimal point. In our case, we need to show only the digit after the decimal point. However, we will create a customizable manual function that can round off the number and show the particular number of digits after the decimal point at the end of this tutorial. This example lets users understand the fundamental need to round a number to a single decimal digit. Suppose the scenario where ...

Read More

How do I Create Dynamic Variable Names Inside a JavaScript Loop?

Shubham Vora
Shubham Vora
Updated on 29-Nov-2024 17K+ Views

To create dynamic variable names inside a JavaScript loop, means it is not hardcoded already, and we can create it according to our needs from some other string values. For achieving this, we will be understanding four different approaches. In this article our task is to create dynamic variable names inside a JavaScript loop. Approaches to Create Dynamic Variable Names Here is a list of approaches to create dynamic variable names inside a JavaScript loop which we will be discussing in this article with stepwise explanation and complete example codes. Using Array ...

Read More

How can I Execute JavaScript at the Command Prompt?

Shubham Vora
Shubham Vora
Updated on 27-Nov-2024 13K+ Views

To execute JavaScript at the command prompt, can be achieved through various methods depending on the environment. We will be discussing three different approach which can be used to execute JavaScript at the command prompt with stepwise explanation of steps. In this article, our task is to execute JavaScript at the command prompt. Different Methods to Run JavaScript at Terminal Here is a list of methods that can be used to execute JavaScript at the command prompt which we will be discussing in this article with stepwise explaination and complete example codes. Runnning JavaScript File ...

Read More

How do you Convert a String to a Character Array in JavaScript?

Shubham Vora
Shubham Vora
Updated on 21-Nov-2024 7K+ Views

To convert a string to character array in JavaScript, is useful when you want to iterate over each charater of the string. It can be used for character manipulation like changing specific character of string. We will be understanding five different approaches for converting a string to character array. In this article we are having a string value and our task is to convert a string to character array in JavaScript. Approaches to Convert String to Character Array Here is a list of approaches to convert a string to character array in JavaScript which we will be discussing in this ...

Read More

How to Compare Two Arrays in JavaScript?

Shubham Vora
Shubham Vora
Updated on 19-Nov-2024 705 Views

To compare two arrays in Javascript, there are various approaches we can use. We will be understanding various approaches in this article. When comparing two arrays, we cannot use “==” or “===” operator as it compares the addresses of the memory block to which both the arrays are pointing resulting in a false result. In this article we are having two arrays and our task is to compare two arrays in JavaScript. Approaches to Compare Arrays in JavaScript Here is a list of approaches to compare two arrays in JavaScript which we will be discussing in this article with stepwise ...

Read More

Java program for minimum move to end operations to make all strings equal

Shubham Vora
Shubham Vora
Updated on 14-Nov-2024 267 Views

In this article, we will learn how to solve a problem where we are given an array of strings, and we need to make all strings equal by rotating them. This can be done by performing left rotations on the strings. We need to count the minimum number of operations required to do this. If it is impossible to make the strings equal, the output should be -1. Problem statement We have given an array containing n strings. All strings are permutations of each other. We need to count the total number of minimum operations required to make all strings ...

Read More

Edge Computing: Definition, Characteristics, and Use Cases

Shubham Vora
Shubham Vora
Updated on 04-Oct-2024 3K+ Views

Traditional cloud computing networks are significantly brought together, with data being collected on the fringe edges and sent back to the essential servers for taking care. This plan grew out of the way that most of the devices arranged near the edge came up short on computational power and limited capacity to separate and then again process the data they accumulated. How much data is ceaselessly being made at the edge is turning out to be decisively speedier than the limit of associations to manage it. As opposed to sending data to a cloud or a distant server homestead ...

Read More

Shimmer Effect using CSS

Shubham Vora
Shubham Vora
Updated on 30-Sep-2024 9K+ Views

To create shimmer effect using CSS, we will be using CSS animations and linear-gradient properties. Shimmer effect is an animation effect used in many webpages while loading the web page. In this article we are having a layout of a box having two other child boxes, our task is to create a shimmer effect using CSS. Steps to Create Shimmer Effect We will be following below mentioned steps to create shimmer effect using CSS. We are having two boxes wrapped inside a div container. The container class sets the dimension of ...

Read More

Use of :even and :odd pseudo-classes with list items in CSS

Shubham Vora
Shubham Vora
Updated on 16-Sep-2024 6K+ Views

CSS :even and :odd psuedo classes are used to select or target the alternative child elements. CSS even and odd psuedo class is used with list items to create alternate style like text color, background which increases the readability. In this article, we are having an unordered list. We will be understanding use of :even and :odd pseudo-classes with list items. CSS odd Psuedo-Class CSS even Psuedo-Class CSS odd Psuedo-Class The :odd pseudo-class is used to select the HTML elements which are at odd positions. We can use the :odd ...

Read More
Showing 1–10 of 793 articles
« Prev 1 2 3 4 5 80 Next »
Advertisements