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 10740 Articles
AmitDiwan
263 Views
Suppose, we have an array of arrays like this −const arr = [ [1, 0], [0, 1], [0, 0] ];We are required to write a JavaScript function that takes in one such array as the first argument and an array of exactly two Numbers as the second ... Read More
AmitDiwan
439 Views
Suppose we have two arrays of strings. The first array contains exactly 12 strings, one for each month of the year like this −const year = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];The second array, contains exactly two strings, denoting a range of months like ... Read More
AmitDiwan
659 Views
Suppose, we have an array of objects and an array of strings like this −Exampleconst orders = [ { status: "pending"}, { status: "received" }, { status: "sent" }, { status: "pending" } ]; const statuses = ["pending", "sent", "received"];We are required to write a JavaScript ... Read More
AmitDiwan
3K+ Views
We are required to write a JavaScript function that takes in an array of intervals (start and end time like this −const arr = [ { start: '01:00', end: '04:00' }, { start: '05:00', end: '08:00' }, { start: '07:00', end: '11:00' }, { start: '09:30', ... Read More
AmitDiwan
425 Views
We are required to write a JavaScript function that takes in a string of any length. The function should then count the number of words in that string.Exampleconst str = 'THis is an example string'; const findWords = (str = '') => { if(!str.length){ return 0; ... Read More
AmitDiwan
251 Views
The perimeter of a triangle is the sum of all three sides of the triangle. We are required to write a JavaScript function that takes in an array of numbers of at least three or more elements.Our function should pick three longest sides (largest numbers) from the array that when ... Read More
AmitDiwan
2K+ Views
We are given two strings, say s and t. String t is generated by random shuffling string s and then add one more letter at a random position.We are required to write a JavaScript function that takes both these strings and returns the letter that was added to t.For example ... Read More
AmitDiwan
392 Views
We know that natural numbers in Mathematics are the numbers starting from 1 and spanning infinitely.First 15 natural numbers are −1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Therefore, the first natural digit is 1, second is 2, third is 3 and so on. ... Read More
AmitDiwan
360 Views
Given a string containing just the characters '(' and ')', we find the length of the longest valid (well-formed) parentheses substring.A set of parentheses qualifies to be a well-formed parentheses, if and only if, for each opening parentheses, it contains a closing parentheses.For example −'(())()' is a well-formed parentheses '())' ... Read More
AmitDiwan
551 Views
We are required to write a JavaScript function that takes in an array of Numbers. The array of numbers can contain both positive as well as negative numbers.The purpose of our function is to find the sub array from the array (of any length), whose elements when summed gives the ... Read More