
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
626 Views
Collinear PointsThree or more points that lie on the same straight line are called collinear points.And three points lie on the same if the slope of all three pairs of lines formed by them is equal.Consider, for example, three arbitrary points A, B and C on a 2-D plane, they ... Read More

AmitDiwan
373 Views
We are required to write a JavaScript function that takes in a string and replaces the adjacent words of that string.For example: If the input string is −const str = "This is a sample string only";Then the output should be −"is This sample a only string"Let’s write the code for ... Read More

AmitDiwan
198 Views
We are required to write a JavaScript function that takes in two numbers, say m and n and returns two numbers whose sum is n and product is m. If there exist no such numbers, then our function should return falseLet’s write the code for this function −Exampleconst perfectNumbers = ... Read More

AmitDiwan
125 Views
We are required to write a JavaScript function that takes in array of strings and delete every one of the two string that start with the same letter.For example, If the actual array is −const arr = ['Apple', 'Jack' , 'Army', 'Car', 'Jason'];Then, we have to keep only one string ... Read More

AmitDiwan
2K+ Views
We are required to write a JavaScript function that takes in a negative integer and returns the sum of its digitsFor example −-234 --> -2 + 3 + 4 = 5 -54 --> -5 + 4 = -1Let’s write the code for this function −ExampleFollowing is the code −const num ... Read More

AmitDiwan
447 Views
We are required to write a JavaScript function that takes in an array of numbers with duplicate entries and sums all the duplicate entries to one indexFor example −If the input array is −const input = [1, 3, 1, 3, 5, 7, 5, 4];Then the output should be −const output ... Read More

AmitDiwan
168 Views
We are required to write a JavaScript function that takes in a number and returns the difference of the sums of the digits at even place and the digits odd placeExampleLet’s write the code −const num = 345336; const evenOddDifference = (num, res = 0, ind = 0) => { ... Read More

AmitDiwan
2K+ Views
We have two arrays of objects like these −const blocks = [ { id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }, ] const containers = [ { block: { id: 1 } }, { block: { id: ... Read More

AmitDiwan
412 Views
We have an array of numbers like this −const arr = [-1, -2, -1, 0, -1, -2, -1, -2, -1, 0, 1, 0];Let’s say, we are required to write a JavaScript function that counts the consecutive groups of negative numbers in the array.Like here we have consecutive negatives from index ... Read More

AmitDiwan
303 Views
We are required to write a JavaScript function that computes the Factorial of a number n by making use of recursive approach.Here, we are finding the factorial recursion and creating a custom function recursiceFactorial() −const num = 9; const recursiceFactorial = (num, res = 1) => { if(num){ ... Read More