
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
254 Views
ProblemWe are required to write a JavaScript function that takes in an array of numbers, arr, as the first and the only argument.The array arr, might contain some duplicates. Our function is supposed to sort the array in such a way that the elements that appear for least number of ... Read More

AmitDiwan
126 Views
ProblemWe are required to write a JavaScript function that takes in two strings of English lowercase alphabets, str1 and str2, as the first and the second argument respectively.Our function is supposed to find and return the lowest ASCII sum of deleted characters to make two strings equal.For example, if the ... Read More

AmitDiwan
150 Views
ProblemWe are required to write a JavaScript function that takes in an array of numbers, arr, as the first argument, and a number, target, as the second argument.Our function is supposed to count and return the number of (contiguous) subarrays where the product of all the elements in the subarray ... Read More

AmitDiwan
348 Views
ProblemWe are required to write a JavaScript function that takes in two arrays of literals, arr1 and arr2, as the first and the second argument respectively.Our function is supposed to return the maximum length of a subarray that appears in both arrays.For example, if the input to the function isInputconst ... Read More

AmitDiwan
135 Views
ProblemWe are required to write a JavaScript function that takes in an array, arr, that represents the positions of different asteroids in a one-dimensional space.For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). Each asteroid moves at the ... Read More

AmitDiwan
145 Views
Monotonically Increasing DigitsAn integer has monotone increasing digits if and only if each pair of adjacent digits x and y satisfy x { const checkMonotone = (x) =>{ if (x = nextDigit) { currentDigit = nextDigit ... Read More

AmitDiwan
247 Views
ProblemWe are required to write a JavaScript function that takes in an array of numbers, arr, as the first and the only argument.Our function should construct a new array for the input in which each corresponding element is the distance to the next greater element than the current element, and ... Read More

AmitDiwan
379 Views
ProblemWe are required to write a JavaScript function convertToLower() that takes in a string method that converts the string it is being called upon into lowercase string and returns the new string.For example, if the input to the function isInputconst str = 'ABcD123';Outputconst output = 'abcd123';ExampleFollowing is the code − Live ... Read More

AmitDiwan
314 Views
ProblemWe are required to write a JavaScript function that takes in a string, str, as the first and the only argument.The purpose of our function is to partition this string into as many parts as possible so that each letter appears in at most one part, and return an array ... Read More

AmitDiwan
79 Views
ProblemWe are required to write a JavaScript function that takes in a 2-D array of literals, arr, as the first and the only argument.Our function should check if every diagonal from top-left to bottom-right has the same element.If it is so, we should return true, false otherwise.For example, if the ... Read More