
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
206 Views
ProblemSuppose we have a S, str. which is an infinite wraparound string of the string −"abcdefghijklmnopqrstuvwxyz".Therefore, S will look like this −"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....".We are required to write a JavaScript function that takes in str, let’s call that string str, as the only argument.Our function should find out how many unique non-empty ... Read More

AmitDiwan
149 Views
Good BaseFor an integer num, we call k (k >= 2) a good base of num, if all digits of num base k are 1.For instance: 13 base 3 is 111, hence 3 is a good base for num = 13ProblemWe are required to write a JavaScript function that takes ... Read More

AmitDiwan
247 Views
We are required to write a JavaScript function that takes in a number as the first and the only argument.The task of our function is to perform at most one swap between any two digits of the number and yield the maximum possible number. If, however, the number is already ... Read More

AmitDiwan
287 Views
Perfect Square Numbers:A natural number in mathematics is called a perfect square if it can be obtained by multiplying any other natural number into that very number.For instance, 9, 16, 81, 289 are all perfect squares.We are required to write a JavaScript function that takes in a natural number, say ... Read More

AmitDiwan
205 Views
Suppose, we have a binary matrix (an array of array that contains only 0 or 1) like this −const arr = [ [0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 1] ];We are required to write a JavaScript function that takes in one such ... Read More

AmitDiwan
224 Views
A binary matrix is an array of arrays containing only 0 or 1. We are required to write a JavaScript function that takes in a binary matrix as the only argument.Our function should create a new matrix containing the same number of rows and columns, and for each element of ... Read More

AmitDiwan
225 Views
We are required to write a JavaScript function that takes in a string str as the first argument and an integer num as the second argument.Our function should reverse the first num characters for every 2 * num characters counting from the start of the string. And if there are ... Read More

AmitDiwan
852 Views
We often come through services like bit.ly and tinyurl which takes in any url and (usually one bigger in length), performs some encryption algorithm over it and returns a very short url. And similarity when we try to open that tiny url, it again runs some decryption algorithm over it ... Read More

AmitDiwan
219 Views
We are required to write a JavaScript function that takes in the root of a BST that holds some numerical data like this −1 \ 3 / 2The function should return the minimum absolute difference between any two nodes of the tree.For example −For the above tree, the output should ... Read More

AmitDiwan
198 Views
We are required to write a JavaScript function that takes in an array of numbers as the first and the only argument.The task of our function is to pick and return the third maximum number from the array. And if the array does not contain any third maximum number then ... Read More