
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
802 Views
We are required to write a function, let’s say splitNumber() that takes in a positive integer and returns an array populated with the place values of all the digits of the number.For example −If the input number is −const num = 1234;OutputThen the output should be −const output = [1000, ... Read More

AmitDiwan
164 Views
We are required to write a JavaScript function that takes in a number and returns a number that can be represented as a power of 2 which is nearest to the input number.For example: If the input number if 145.Then the output should be 128 because 145 is the nearest ... Read More

AmitDiwan
194 Views
We are required to write a JavaScript function that takes in a sorted array of literals as the first argument and a query literal as second. Then our function should make use of the Binary Search algorithm to find whether the query exists in the array or not.If it exists, ... Read More

AmitDiwan
109 Views
We are required to write a JavaScript function that takes in three numbers (representing the coefficient of quadratic term, coefficient of linear term and the constant respectively in a quadratic quadratic).And we are required to find the roots, (if they are real roots) otherwise we have to return false.ExampleThe code ... Read More

AmitDiwan
411 Views
We are required to write a JavaScript function that takes in a string and returns a new string with only the words that appeared for more than once in the original string.For example:If the input string is −const str = 'this is a is this string that contains that some ... Read More

AmitDiwan
675 Views
The Bucket Sort works by splitting the array of size n into k buckets which holds a specific range of element values.Then, these buckets are then sorted using a sorting algorithm which can be chosen based on the expected input size.We can describe this algorithm as follows −Algorithm:Create the initial ... Read More

AmitDiwan
2K+ Views
We are required to write a JavaScript function that takes in two 2-D arrays of numbers and returns their matrix multiplication result.Let’s write the code for this function −ExampleThe code for this will be −const multiplyMatrices = (a, b) => { if (!Array.isArray(a) || !Array.isArray(b) || !a.length || !b.length) ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in a string and constructs a new string with all the uppercase characters from the original string converted to lowercase and all the lowercase characters converted to uppercase from the original string.For example: If the string is −const str = ... Read More

AmitDiwan
322 Views
We are required to write a JavaScript function that takes in a number and returns an array of all the prime numbers that exactly divide the input number.For example, if the input number is 105.Then the output should be −const output = [3, 5, 7];ExampleThe code for this will be ... Read More

AmitDiwan
151 Views
We are required to write a JavaScript function that takes in a string and returns a new string with all the character of the original string just the whitespaces removed.ExampleThe code for this will be −const str = "This is an example string from which all whitespaces will be removed"; ... Read More