
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
242 Views
Suppose, we have a square matrix represented by a 2-D array in JavaScript like this −const arr = [ [1, 3, 5], [3, 5, 7], [2, 4, 2] ];We are required to write a JavaScript function that takes in one such array.The function should return the difference ... Read More

AmitDiwan
189 Views
We are required to write a JavaScript function that takes in two numbers, say m and n, and it returns an array of first n multiples of m.For example −If the numbers are 4 and 6Then the output should be −const output = [4, 8, 12, 16, 20, 24]ExampleFollowing is ... Read More

AmitDiwan
285 Views
A tidy number is a number whose digits are in non-decreasing order.For example −489 is a tidy number 234557 is also a tidy number 34535 is not a tidy numberWe are required to write a JavaScript function that takes in a number and checks whether its a tidy number or ... Read More

AmitDiwan
145 Views
Suppose, we have an array of literals like this −const arr = [3, 5, 5, 2, 23, 4, 7, 8, 8, 9];We are required to write a JavaScript function that takes in this array and a number, say n, and returns an object representing the count of elements greater than ... Read More

AmitDiwan
221 Views
We are required to write a JavaScript function that counts all unique items in an array. The function should return an object representing the count of each unique element of the array.Let’s say the following is our array −const arr = ["hi", "hello", "hi"];ExampleFollowing is the code −const arr = ... Read More

AmitDiwan
1K+ Views
Suppose, we have an array like this −const arr = [2, 42, 82, 122, 162, 202, 242, 282, 322, 362];We are required to write a JavaScript function that takes in one such array and a number, say n.The function should return the index of item from the array which is ... Read More

AmitDiwan
104 Views
We are required to write a JavaScript function that should repeat the even number inside the same array.Therefore, for example given the following array −const arr = [1, 2, 5, 6, 8];We should get the output −const output = [1, 2, 2, 5, 6, 6, 8, 8];ExampleFollowing is the code ... Read More

AmitDiwan
345 Views
A number is gapful if it is at least 3 digits long and is divisible by the number formed by stringing the first and last numbers together. The smallest number that fits this description is 100. First digit is 1, last digit is 0, forming 10, which is a factor ... Read More

AmitDiwan
435 Views
Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array.The sequence a0, a1, ..., an is considered to be a strictly increasing if a0 < a1 < ... < an. Sequence ... Read More

AmitDiwan
159 Views
Suppose, we have an array like this −const arr = [ [1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7] ];The array is bound to be a square matrix.We are required to write a JavaScript function that takes in ... Read More