
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
115 Views
ProblemWe are required to write a JavaScript function that takes in a number n. Our function should return the next higher multiple of five of that number, obtained by concatenating the shortest possible binary string to the end of this number's binary representation.ExampleFollowing is the code −const generateAll = (num ... Read More

AmitDiwan
369 Views
ProblemWe are required to write a JavaScript function that takes in a sting and returns true if all the characters in the string appear only once and false otherwise.ExampleFollowing is the code − Live Democonst str = 'thisconaluqe'; const allUnique = (str = '') => { for(let i = 0; ... Read More

AmitDiwan
497 Views
ProblemA Boggle board is a 2D array of individual characters, e.g. −const board = [ ["I", "L", "A", "W"], ["B", "N", "G", "E"], ["I", "U", "A", "O"], ["A", "S", "R", "L"] ];We are required to write a JavaScript function that takes in boggle board and a ... Read More

AmitDiwan
220 Views
ProblemWe are required to write a JavaScript function that takes in a number n. Our function should find the absolute difference between the sum and the product of all the digits of that number.ExampleFollowing is the code − Live Democonst num = 434312; const sumProductDifference = (num = 1) => { ... Read More

AmitDiwan
599 Views
ProblemWe are required to write a JavaScript function that takes in an array of integers (positives and negatives) and our function should return an array, where the first element is the count of positives numbers and the second element is sum of negative numbers.ExampleFollowing is the code − Live Democonst arr ... Read More

AmitDiwan
823 Views
Amicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to the other number. When it is required to check if two numbers are amicable numbers, a method can be defined that iterates over the number, and uses the modulus operator. ... Read More

AmitDiwan
1K+ Views
When it is required to compute a polynomial equation when the coefficients of the polynomial are stored in a list, a simple ‘for’ loop can be used.Below is the demonstration of the same −Example Live Demomy_polynomial = [2, 5, 3, 0] num = 2 poly_len = len(my_polynomial) my_result = 0 for ... Read More

AmitDiwan
7K+ Views
Strong number is a number whose sum of all digits’ factorial is equal to the number ‘n’. Factorial implies when we find the product of all the numbers below that number including that number and is denoted by ! (Exclamation sign), For example: 5! = 5x4x3x2x1 = 120. When it ... Read More

AmitDiwan
3K+ Views
A number is said to be a Perfect Number when that is equal to the sum of all its positive divisors except itself. When it is required to check if a number is a perfect number, a simple ‘for’ loop can be used.Below is the demonstration of the same −Example Live ... Read More

AmitDiwan
610 Views
When it is required to print the pascal’s triangle for a specific number of rows, where the number is entered by the user, a simple ‘for’ loop is used.Below is the demonstration of the same −Example Live Demofrom math import factorial input = int(input("Enter the number of rows...")) for i ... Read More