Nikitasha Shrivastava has Published 195 Articles

Pair whose sum exists in the array in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-Aug-2023 12:39:25

184 Views

In this article we will see how to find a pair of items in an array which has sum equals to a specific target number. So we will use JavaScript to implement the algorithm. Understanding the Problem The problem at hand is to find the pair of numbers ... Read More

Number Split into individual digits in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-Aug-2023 12:33:34

1K+ Views

In the given problem statement we are presented with a digit and our task is to split it into individual digits with the help of Javascript. So we can convert the given number into a string and then we can use it in string manipulation techniques to get the desired ... Read More

Non-negative set subtraction in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-Aug-2023 12:28:08

286 Views

In the given problem statement we are presented with two arrays which contain integer values. So our aim is to find the non negative set subtraction from the two arrays. And implement the solution in Javascript. We can perform this task using the Set object and forEach method. What ... Read More

Maximum sum of n consecutive elements of array in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 16-Aug-2023 12:23:07

662 Views

In the given problem statement our aim is to find the maximum sum of n consecutive items of array with the help of Javascript functionalities. So for solving this problem we will use basic Javascript functionalities and produce the maximum sum. Understanding the Problem The problem at hand ... Read More

Largest difference between element with a twist in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 14-Aug-2023 18:38:03

89 Views

In this problem statement we have to find the largest difference between elements with a twist with the help of Javascript functionalities. So we will use basic Javascript to get the desired result. Understanding the problem The problem at hand is to find the largest difference between two ... Read More

JavaScript: Adjacent Elements Product Algorithm

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 14-Aug-2023 18:35:54

555 Views

In the given problem statement we have to calculate the adjacent elements product with the help of Javascript functionalities. So we will use a loop and basic mathematical operations to solve this problem. Understanding the problem The problem statement at hand is to calculate the product of two ... Read More

JavaScript Total subarrays with Sum K

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 14-Aug-2023 18:34:25

314 Views

In this problem statement, our task is to write the function for getting the total subarrays with sum K with the help of Javascript. So for doing this task we will use basic functionality of Javascript. Understanding the problem statement The problem statement is to create a function ... Read More

JavaScript Sum odd indexed and even indexed elements separately and return their absolute difference

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 14-Aug-2023 18:32:35

1K+ Views

In this problem we will understand how to get the absolute difference of the sum of odd indexed and even indexed items separately with the help of Javascript functionalities. We will use a simple loop to iterate through all the elements of the array. Understanding the problem statement ... Read More

JavaScript program to convert positive integers to roman numbers

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 14-Aug-2023 18:30:42

416 Views

In the given problem we have to change the given positive number (the number should be an integer number) into the corresponding roman number and then implement the code using Javascript. Understanding the problem We have to write a Javascript program to generate the roman number representation ... Read More

JavaScript - Find if string is a palindrome (Check for punctuation)

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 14-Aug-2023 18:29:04

496 Views

In the given problem statement we have to find that the string is a palindrome and the string should also have punctuation and write code with the help of Javascript functionalities. Understanding the problem The problem at hand is to explore how to determine whether a given ... Read More

Advertisements