Nikitasha Shrivastava has Published 194 Articles

Convert number to characters in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:24:43

7K+ Views

In the given problem statement we are asked to convert numbers to characters with the help of javascript functionalities. In Javascript we have some built−in functions to convert a number to its corresponding characters and also with user defined functions we can convert it. Logic for The Above Problem As ... Read More

Check if items in an array are consecutive but WITHOUT SORTING in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:21:54

885 Views

In the above statement we are asked to check if items in an array are consecutive without sorting the array with the help of javascript functionalities. We can solve this problem with some basic functionalities of javascript. Let us see how to do this! What are Consecutive Items in ... Read More

Calculating the average for each subarray separately and then return the sum of all the averages in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:16:44

207 Views

In the given problem statement we are asked to calculate the average for each subarray separately and then return the sum of all the averages with the help of javascript functionalities. As we talk about average for subarrays we can use the reduce method of javascript. What is the reduce() ... Read More

Calculate the difference between the first and second element of each subarray separately and return the sum of their differences in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:13:17

345 Views

In the given problem statement we are asked to calculate the difference between the first and second element of each subarray separately and we have to return the sum of their differences with the help of javascript functionalities. In the array data structures we can define an array which can ... Read More

Validating a power JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:34:49

172 Views

In this problem we have to validate that a given number is a power of n. If the given number is power of n then it should return the true value of it otherwise it should return false. To check this kind of validation we generally use arithmetic ... Read More

Unique sort (removing duplicates and sorting an array) in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:32:47

4K+ Views

As the problem stated, create a program for a unique sort in javascript. Basically we have to remove duplicate elements from an array. Understand the problem In this problem statement we need to eliminate the same or duplicated item from an array. For solving this kind of ... Read More

Split array entries to form object in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:30:35

489 Views

The problem statement is saying that we have to find a solution for a given array and split it to form an object with a key-value pair in javascript. Understand the problem In simple terms we have to convert a given array into an object. There are ... Read More

Sort the array and group all the identical (duplicate) numbers into their separate subarray in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:27:43

2K+ Views

In this problem, we have to group all the duplicate data in the array by making their subarray. After making the subarray we have to arrange them in a sorted order. This problem can be solved by searching techniques of data structures. Understanding the Problem So for ... Read More

Sort Array of objects by two properties in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:24:35

2K+ Views

Given problem says to sort the given array of objects by two properties and create a program in javascript. Understanding the problem Let's have a deep understanding of the problem statement. You will be given an array of objects with key and value. As per the problem statement ... Read More

Merging sorted arrays together JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:22:23

839 Views

Merging the sorted arrays together in javascript can be done using the sorting techniques available in data structures. In this problem we will be given two sorted arrays and we have to merge them. After merging them, return a single array which is also in a sorted form. ... Read More

Previous 1 ... 6 7 8 9 10 ... 20 Next
Advertisements