
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
226 Views
We are required to write a JavaScript function that takes in two sorted array of numbers. The function should merge the two arrays together to form a resultant sorted array and return that array.For example −If the two arrays are −const arr1 = [2, 6, 6, 8, 9]; const arr2 ... Read More

AmitDiwan
1K+ Views
Suppose, we have two arrays of objects like these −const arr1 = [ {name:'test', lastname: 'test', gender:'f'}, {name:'test1', lastname: 'test1', gender:'f'}, {name:'test2', lastname: 'test2', gender:'m'} ]; const arr2 = [ {name:'test21', lastname: 'test21', gender:'f'}, {name:'test1', lastname: 'test1', gender:'f'}, {name:'test2', lastname: 'test2', gender:'m'}, {name:'test22', ... Read More

AmitDiwan
573 Views
We are required to write a JavaScript function that takes in a number as the only argument. The function should then return a random generated number which is always divisible by the number provided by the argument.ExampleThe code for this will be −const num = 21; // function that generates ... Read More

AmitDiwan
646 Views
We are required to write a JavaScript function that takes in an array of string literals as the first argument and a single string character as the second argument.Then our function should find and return the first array entry that starts with the character specified by the second argument.ExampleThe code ... Read More

AmitDiwan
270 Views
We are required to write a JavaScript function on the prototype object of a BinarySearchTree data type that takes in a value and finds whether or not that value is contained in the BST.ExampleThe code for this will be -// class for a single Node for BST class Node { ... Read More

AmitDiwan
240 Views
We are required to write a JavaScript function that takes in an array of exactly two numbers specifying a range.The function should then calculate the least common multiple of all the numbers within that range and return the final result.ExampleThe code for this will be −const range = [8, 3]; ... Read More

AmitDiwan
352 Views
This problem takes its name by arguably the most important event in the life of the ancient historian Josephus − according to his tale, he and his 40 soldiers were trapped in a cave by the Romans during a siege.Refusing to surrender to the enemy, they instead opted for mass ... Read More

AmitDiwan
1K+ Views
Let's say we have a variable “users” that contains the following string of text where each user is separated by a semicolon and each attribute of each users is separated by a comma −const users = 'Bob, 1234, Bob@example.com;Mark, 5678, Mark@example.com';We are required to write a JavaScript function that takes ... Read More

AmitDiwan
659 Views
Suppose we have an array of objects that contains the data about some students and their marks like this −const arr = [ { subject: 'Maths', marks: '40', noOfStudents: '5' }, { subject: 'Science', marks: '50', noOfStudents: '16' }, { subject: 'History', marks: '35', noOfStudents: '23' }, ... Read More

AmitDiwan
2K+ Views
Suppose we have a number, const num = 76;However, If we round off this number to nearest 10 place, the result will be 80If we round off this number to nearest 100 place, the result will be 100If we round off this number to nearest 1000 place, the result will ... Read More