
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
391 Views
ProblemWe are required to write a JavaScript function that takes in an array of numbers arr, and a number n.Our function should retrieve the n smallest from the array arr without disturbing their relative order. It means they should not be arranged in increasing or decreasing order rather they should ... Read More

AmitDiwan
606 Views
ProblemWe are required to write a JavaScript function that takes in a string and replaces all occurrences of the vowels in the string with their index in the string (1-based).It means if the second letter of the string is a vowel, it should be replaced by 2.ExampleFollowing is the code ... Read More

AmitDiwan
303 Views
ProblemWe are required to write a JavaScript function that takes in two strings, str1 and str2. Our function should return true if a portion of str1 characters can be rearranged to match str2, otherwise returns false.ExampleFollowing is the code − Live Democonst str1 = 'rkqodlw'; const str2 = 'world'; const canForm ... Read More

AmitDiwan
289 Views
ProblemWe are required to write a JavaScript function that takes in a number that represents a year and find the century that year falls in.For instance, 1864 falls in the 19th century.2021 falls in the 21st century.ExampleFollowing is the code − Live Democonst year = 1956; const findCentury = (year) => ... Read More

AmitDiwan
588 Views
ProblemWe are required to write a JavaScript function that takes in a string of words str. Our function needs to return an array of the words, sorted alphabetically by the final character in each.If two words have the same last letter, the returned array should show them in the order ... Read More

AmitDiwan
363 Views
ProblemWe are required to write a JavaScript function that takes in a mixed array of number and string representations of integers.Our function should add up okthe string integers and subtract this from the total of the non-string integers.ExampleFollowing is the code − Live Democonst arr = [5, 2, '4', '7', '4', ... Read More

AmitDiwan
334 Views
ProblemCoding decimal numbers with factorials is a way of writing out numbers in a base system that depends on factorials, rather than powers of numbers.In this system, the last digit is always 0 and is in base 0!. The digit before that is either 0 or 1 and is in ... Read More

AmitDiwan
935 Views
ProblemWe are required to write a JavaScript function that takes in an array arr. Our function should find and return the product of all the elements of the array.ExampleFollowing is the code − Live Democonst arr = [3, 1, 4, 1, 2, -2, -1]; const produceElements = (arr = []) => ... Read More

AmitDiwan
222 Views
ProblemWe are required to write a JavaScript function that takes in an array of exactly two numbers.The first element specifies the numerator of any rational number and the second element specifies the denominator of the same.Our function should return an array of any number of sub arrays of two elements ... Read More

AmitDiwan
320 Views
ProblemWe are required to write a JavaScript function that takes in a string that represents a decimal number.Our function should convert/encode this decimal into binary based on the following rules.For each digit d of nLet k be the number of bits of dWe write k-1 times the digit 0 followed ... Read More