
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
653 Views
We are required to write a JavaScript function that takes in a lowercase string and returns a new string in which all the elements between [a, m] are represented by 0 and all the elements between [n, z] are represented by 1.ExampleFollowing is the code −const str = 'Hello worlld ... Read More

AmitDiwan
314 Views
We are required to write a JavaScript recursive function that takes in a number and returns the greatest digit in the number.For example: If the number is −45654356Then the return value should be 6ExampleFollowing is the code −const num = 45654356; const greatestDigit = (num = 0, greatest = 0) ... Read More

AmitDiwan
222 Views
In Physics, the equivalent resistance of say 3 resistors connected in series is given by −R = R1 + R2 + R3And the equivalent resistance of resistors connected in parallel is given by −R = (1/R1) + (1/R2) + (1/R3)We are required to write a JavaScript function that takes a ... Read More

AmitDiwan
462 Views
We are required to write a JavaScript function that takes in a string with atleast one vowel, and for each character in the string we have to map a number in a string representing its nearest distance from a vowel.For example: If the string is −const str = 'vatghvf';Then the ... Read More

AmitDiwan
464 Views
Suppose, we have three lines of length, respectively l, m and n. These three lines can only form a triangle, if the sum of any arbitrary two sides is greater than the third side.For example, if the length of three lines is 4, 9 and 3, they cannot form a ... Read More

AmitDiwan
2K+ Views
Snake case is basically a style of writing strings by replacing the spaces with '_' and converting the first letter of each word to lowercase.We are required to write a JavaScript function that takes in a string and converts it to snake case.ExampleFollowing is the code −const str = 'This ... Read More

AmitDiwan
217 Views
We are required to write a JavaScript function that takes in a string and returns the index of first character that appears twice in the string.If there is no such character then we should return -1. Following is our string −const str = 'Hello world, how are you';ExampleFollowing is the ... Read More

AmitDiwan
142 Views
We are required to write a JavaScript function that takes in two strings and find the number of corresponding dissimilarities in the stringsThe corresponding elements will be dissimilar if they are not equal. Let’s say the following are our two string −const str1 = 'Hello world!!!'; const str2 = 'Hellp ... Read More

AmitDiwan
521 Views
We are required to write a JavaScript function that takes in a string and reverses the words in the string that have an odd number of characters in them.Any substring in the string qualifies to be a word, if either it is encapsulated by two spaces on either ends or ... Read More

AmitDiwan
230 Views
We are required to write a JavaScript function that takes in a sentence string and a character and the function should reverse all the words in the string starting with that particular character.For example: If the string is −const str = 'hello world, how are you';Starting with a particular character ... Read More