
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
141 Views
We have to write a simple function in JavaScript that takes in an array of Numbers (nested to any level) and return the greatest number present in the array.For example:If the input array is −const arr = [ 34, 65, 67, [ 43, 76, 87, ... Read More

AmitDiwan
227 Views
We have an array of numbers and are required to write a function that returns an array with the average of the corresponding element and its predecessor.For the first element, as there are no predecessors, so that very element should be returned.Let’s write the code for this function, we will ... Read More

AmitDiwan
448 Views
We have to write a function that takes in an array, removes all duplicates from it and inserts the same number of empty strings at the end.For example: If we find 4 duplicate values we have to remove then all and insert four empty strings at the end.Therefore, let’s write ... Read More

AmitDiwan
204 Views
We have to write a simple function in JavaScript that takes in an array of Numbers (nested to any level) and return the greatest number present in the array.For example: If the input array is −const arr = [ 34, 65, 67, [ 43, 76, ... Read More

AmitDiwan
168 Views
We are required to write a function that returns the index of the very first element that appears at least twice in the array. If no element appears more than once, we have to return -1. We have to do this in constant space (i.e., without utilizing extra memory).So, let's ... Read More

AmitDiwan
503 Views
We are supposed to write a function that takes in an array of number/string literals. The function should remove all the redundant consecutive elements of the array without using extra memory space.For example, if the input array is −const arr = [17, 17, 17, 12, 12, 354, 354, 1, 1, ... Read More

AmitDiwan
97 Views
We have an array of numbers that have got identical entries. We are required to write a function that takes in the array and groups all the identical entries into one subarray and returns the new array thus formed.For example: If the input array is −const arr = [234, 65, ... Read More

AmitDiwan
627 Views
We are required to write a JavaScript array function that takes in a nested array with false values as well and returns an array with all the elements present in the array without any nesting.For example: If the input is −const arr = [[1, 2, 3], [4, 5, [5, false, ... Read More

AmitDiwan
101 Views
We are required to write a function that takes in an array and returns a new array that have all duplicate values removed from it. The values that appeared more than once in the original array should not even appear for once in the new array.For example, if the input ... Read More

AmitDiwan
128 Views
We are required to write a JavaScript function that takes in a string that might contain some special characters.The function should return a new string should have all special characters replaced with their corresponding ASCII value.Therefore, let’s write the code for this function −ExampleThe code for this will be −const ... Read More