
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
150 Views
ProblemJavaScript function that takes in a 2-D array, arr, as the first and the only argument.Each subarray of our input array is an array of exactly two numbers, specifying a time interval.Our function should remove all intervals that are covered by another interval in the array arr. Interval [a, b) ... Read More

AmitDiwan
133 Views
ProblemJavaScript function that takes in an array of integers sorted in increasing order, arr.There is exactly one integer in the array that occurs more than one fourth times (25%) of the times, our function should return that number.For example, if the input to the function is −const arr = [3, ... Read More

AmitDiwan
191 Views
Problem:We are required to write a JavaScript function that takes in the roots of two binary search trees, root1 and root2, as the first and the second argument respectively. The third argument to the function is number, target.Our function should return True if and only if there is a node ... Read More

AmitDiwan
2K+ Views
ProblemJavaScript function that takes in a string, str, as the first and the only argument.A duplicate removal consists of choosing two adjacent and equal letters, and removing them.We repeatedly make duplicate removals on string str until we no longer can.And our function should finally return the final string after all ... Read More

AmitDiwan
196 Views
ProblemWe are required to write a JavaScript function that takes in the head of the linked list as the first and the only argument.This linkedlist contains numerical data. Each node in the list may have a next larger value: for node_i, next_larger(node_i) is the node_j.val such that j > i, ... Read More

AmitDiwan
126 Views
ProblemJavaScript function that takes in an array of Integers, arr, as the first and the only argument.Our function should pick an index pair (i, j) such that (arr[i] + arr[j]) + (i - j) is maximum amongst all index pairs in the array. Our function should then return the maximum ... Read More

AmitDiwan
367 Views
Word ChainLet's say word1 is a predecessor of word2 if and only if we can add exactly one letter anywhere in word1 to make it equal to word2. For example, "abc" is a predecessor of "abac".A word chain is a sequence of words [word_1, word_2, ..., word_k] with k >= ... Read More

AmitDiwan
187 Views
ProblemJavaScript function that takes in an array of literals, arr, as the first and the only argument. This array contains some duplicates placed adjacently.Our function should rearrange the elements of the array such that no two elements in the array are equal. Our function should return the rearranged array, given ... Read More

AmitDiwan
397 Views
Sequential Digits NumberA number has sequential digits if and only if each digit in the number is one more than the previous digit.ProblemWe are required to write a JavaScript function that takes in an array, arr, of exactly two elements specifying a range.Our function should return a sorted array of ... Read More

AmitDiwan
344 Views
ProblemSuppose there are n people standing in a queue, we wish to distribute bananas to the people in the following way −We give 1 banana to the first person, 2 bananas to the second person, and so on until we give n bananas to the last person.Then, we go back ... Read More