
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
617 Views
For the purpose of this question, we define an interval as an array of two numbers where the first number is always smaller than the second number.For example −[4, 6], [2, 3], [6, 8], [2, 7], [1, 8] are all examples of valid intervals.Suppose, we have an array of intervals ... Read More

AmitDiwan
302 Views
Suppose we have an array of Numbers that contains any frequency of exactly three elements - 1, 0 and 1 like this −const arr = [1, 1, 0, -1, 1, 0, -1, 1, 0, 0, 1];We are required to write a JavaScript function that takes in one such array. The ... Read More

AmitDiwan
278 Views
We are required to write a JavaScript function that takes in an array of numbers as the first and the only argument.The function should then try removing one such element from the array, upon removal of which, the sum of elements at odd indices is equal to the sum of ... Read More

AmitDiwan
611 Views
Suppose we have an array of objects like this −const arr = [{ name: 'Dinesh Lamba', age: 23, occupation: 'Web Developer', }, { address: 'Vasant Vihar', experience: 5, isEmployed: true }];We are required to write a JavaScript function that takes in one such array ... Read More

AmitDiwan
134 Views
We are required to write a JavaScript function that takes in an array of integers as the first argument and an integer as the second argument.The function should check whether we can create n (second argument) subarrays from the original array such that all the subarrays have the equal sum.For ... Read More

AmitDiwan
1K+ Views
Tribonacci Series:The tribonacci sequence is a generalization of the Fibonacci sequence where each term is the sum of the three preceding terms.For example, the first few terms of the tribonacci series are −0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149We are required to write a JavaScript function ... Read More

AmitDiwan
385 Views
The diameter of a binary tree is the (left_height + right_height + 1) for each node. So in this method we will calculate (left_height + right_height + 1) for each node and update the result . The time complexity here stays O(n).Let us first define the struct that would represent ... Read More

AmitDiwan
380 Views
A matrix is said to be diagonally dominant matrix if for every matrix row, the diagonal entry magnitude of the row is larger than or equal to the sum of the magnitudes of every other non-diagonal entry in that row.Let us first define a constant int variable N with value ... Read More

AmitDiwan
248 Views
To consider the nodes that are passing between lines of slope -1. The diagonal traversal of the binary tree will be to traverse and print all those nodes present between these lines.Let us first define the struct that would represent a tree node that contains the data and its left ... Read More

AmitDiwan
184 Views
To consider the nodes that are passing between lines of slope -1. The diagonal sum of the binary tree will be calculated by the sum of all nodes data that are present between these lines of reference.Let us first define the struct that would represent a tree node that contains ... Read More