
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
154 Views
We are required to write a JavaScript function that takes in an array of numbers that may contain some duplicate numbers. Our function should return the sum of all the unique elements (elements that only appear once in the array) present in the array.For exampleIf the input array is −const ... Read More

AmitDiwan
363 Views
Suppose, we have an array of objects like this −const arr = [{a: 2, b: 5, c: 6}, {a:3, b: 4, d:1}, {a: 1, d: 2}];Each object is bound to have unique in itself (for it to be a valid object), but two different objects can have the common keys ... Read More

AmitDiwan
3K+ Views
Suppose we have an object like this −const obj = { key1: 56, key2: 67, key3: 23, key4: 11, key5: 88 };We are required to write a JavaScript function that takes in this object and returns a sorted array like this −const arr = [11, ... Read More

AmitDiwan
313 Views
We are required to write a JavaScript function that takes in an array of String / Number literals and returns a subarray of all the elements that were palindrome in the original array.For exampleIf the input array is −const arr = ['carecar', 1344, 12321, 'did', 'cannot'];Then the output should be ... Read More

AmitDiwan
1K+ Views
Suppose, we have an object like this −const products = { "Pineapple":38, "Apple":110, "Pear":109 };All the keys are unique in themselves and all the values are unique in themselves.We are required to write a function that accepts a value and returns its key. Let' say we have ... Read More

AmitDiwan
118 Views
We are required to write a function that, given a number, say, 123, will output an array −[100, 20, 3]Basically, the function is expected to return an array that contains the place value of all the digits present in the number taken as an argument by the function.We can solve ... Read More

AmitDiwan
210 Views
Suppose, we have an array of arrays of numbers like this −const arr = [[1, 45], [1, 34], [1, 49], [2, 34], [4, 78], [2, 67], [4, 65]];Each subarray is bound to contain strictly two elements. We are required to write a function that constructs a new array where all ... Read More

AmitDiwan
97 Views
We are required to write a JavaScript function that creates a multi-dimensional array based on some inputs.It should take in three elements, namely −row - the number of subarrays to be present in the array, col - the number of elements in each subarray, val - the val of each ... Read More

AmitDiwan
7K+ Views
We have a special kind of string that contains characters in couple, like this −const str = "AABBCCDDEE";We are required to construct an object based on this string which should look like this −const obj = { code: "AA", sub: { code: "BB", ... Read More

AmitDiwan
293 Views
We have to write a function that takes in an array, removes all duplicates from it and inserts the same number of empty strings at the end.For example:If we find 4 duplicate values we have to remove then all and insert four empty strings at the end.Therefore, let’s write the ... Read More