
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
162 Views
ProblemWe are required to write a JavaScript function that takes in a range array of two numbers. Our function should find the sum of all the cubes of the numbers that falls in the specified range.ExampleFollowing is the code − Live Democonst range = [4, 11]; const sumCubes = ([l, h]) ... Read More

AmitDiwan
693 Views
Parity BitA parity bit, or check bit, is a bit added to a string of bits to ensure that the total number of 1-bits in the string is even or odd.ProblemWe are required to write a JavaScript function that takes in two parameters, one being the wanted parity (always 'even' ... Read More

AmitDiwan
188 Views
ProblemWe are required to write a JavaScript function that takes in a string that contains binary strings of length 3 all separated by spaces.Our function should sort the numbers in ascending order but only order the even numbers and leave all odd numbers in their place.ExampleFollowing is the code − Live ... Read More

AmitDiwan
2K+ Views
ProblemWe are required to write a JavaScript function that takes in an array of numbers sorted in increasing order.Our function should calculate the variance for the array of numbers. Variance of a set of numbers is calculated on the basis of their mean.$Mean (M) = ( \sum_{i=0}^{n-1} arr[i])$ / nAnd ... Read More

AmitDiwan
322 Views
ProblemWe are required to write a JavaScript function that takes in an array of numbers. Our function should map the input array to another array in which each element is raised to its 0-based index.And finally, our function should return this new array.ExampleFollowing is the code − Live Democonst arr = ... Read More

AmitDiwan
528 Views
ProblemWe are required to write a JavaScript function that takes in a mathematical expression as a string and return its result as a number.We need to support the following mathematical operators −Division / (as floating-point division)Addition +Subtraction -Multiplication *Operators are always evaluated from left-to-right, and * and / must be ... Read More

AmitDiwan
153 Views
ProblemWe are required to write a JavaScript function that takes in an array of n strings. And each string in the array consists of exactly n characters.Our function should first sort the array in alphabetical order. And then return the string formed by the characters present at the principal diagonal ... Read More

AmitDiwan
282 Views
ProblemWe are required to write a JavaScript function that takes in three arrays of numbers. Our function should return the sum of all those numbers that are common in all three arrays.ExampleFollowing is the code − Live Democonst arr1 = [4, 4, 5, 8, 3]; const arr2 = [7, 3, 7, ... Read More

AmitDiwan
373 Views
ProblemWe are required to write a JavaScript function that takes in a number n and bound number b.Our function should find the largest integer num, such that −num is divisible by divisornum is less than or equal to boundnum is greater than 0.ExampleFollowing is the code − Live Democonst n = ... Read More

AmitDiwan
314 Views
ProblemWe are required to write a JavaScript function that takes in a 2-D array of numbers. Our function should pick the smallest number from each row of the 2-D array and then finally return the sum of those smallest numbers.ExampleFollowing is the code − Live Democonst arr = [ [2, ... Read More