Nikitasha Shrivastava has Published 195 Articles

Calculating median of an array in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-May-2023 11:40:18

3K+ Views

In this problem statement, our task is to calculate the median of an array with the help of Javascript functionalities. There are several ways that can be used to solve this task. One simple method to calculate median is using the built-in function of Javascript. Understanding the problem statement The ... Read More

Average of array excluding min max JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-May-2023 11:31:23

557 Views

In this problem statement, our task is to find the average of the array excluding minimum and maximum values from the array with the help of Javascript functionalities. This task can be done by excluding the minimum and maximum values and calculating the average of the rest of the elements. ... Read More

All possible odd length subarrays JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-May-2023 11:28:52

298 Views

In this problem statement, our task is to find all the possible odd length subarrays with the help of Javascript functionalities. This task can be done with the help of some built in functions of Javascript or we can solve it by multiple for loops. Logic for the given ... Read More

Algorithm to get the combinations of all items in array JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-May-2023 10:49:18

3K+ Views

In this problem statement, our task is to get the combinations of all items in an array with the help of Javascript functionalities. So for doing this task we can use a recursive approach that iteratively adds items to a running list of combinations. Understanding the problem statement The problem ... Read More

Adding a unique id for each entry in JSON object in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-May-2023 10:46:42

3K+ Views

In this problem statement, our task is to add a unique id for every object entry in a JSON object with the help of Javascript. So for doing this task we will use a loop and a variable to store the id for each object in the JSON object. Understanding ... Read More

Advertisements