
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
288 Views
Doubleton NumberWe will call a natural number a "doubleton number" if it contains exactly two distinct digits. For example, 23, 35, 100, 12121 are doubleton numbers, and 123 and 9980 are not.ProblemWe are required to write a JavaScript function that takes in a number and return true if it is ... Read More

AmitDiwan
284 Views
ProblemWe are required to write a JavaScript function that takes in a string. Our function should convert every character of the string to the hex value of its ascii code, then the result should be the sum of the numbers in the hex strings ignoring the letters present in hex.ExampleFollowing ... Read More

AmitDiwan
265 Views
Lucas NumbersLucas numbers are numbers in a sequence defined like this −L(0) = 2 L(1) = 1 L(n) = L(n-1) + L(n-2)ProblemWe are required to write a JavaScript function that takes in a number n and return the nth lucas number.ExampleFollowing is the code − Live Democonst num = 21; const ... Read More

AmitDiwan
2K+ Views
When it is required to print all possible combination of digits when the input is taken from the user, nested loop is used.Below is a demonstration of the same −Example Live Demofirst_num = int(input("Enter the first number...")) second_num = int(input("Enter the second number...")) third_num = int(input("Enter the third number...")) my_list = ... Read More

AmitDiwan
336 Views
When it is required to print all the permutations of a string in lexicographic order using recursion, a method is defined, that uses the ‘for’ loop to iterate over the sequence of elements, and use the ‘join’ method to join the elements.Below is the demonstration of the same −Example Live Demofrom ... Read More

AmitDiwan
275 Views
When it is required to print the nodes in the left subtree, a class can be created that consists of methods can be defined to set the root node, perform in order traversal, insert elements to the right of the root node, to the left of the root node, and ... Read More

AmitDiwan
457 Views
When it is required to print all the permutations of a string in the lexicographic order without using recursion, a method is defined, that takes the string as the parameter. It uses a simple ‘for’ loop to iterate over the string elements and uses ‘while’ condition to check for certain ... Read More

AmitDiwan
720 Views
When it is required to form a new string that is made from the first two and last two characters of a given string, a counter can be defined, and indexing can be used to access specific range of elements.Below is the demonstration of the same −Example Live Demomy_string = "Hi ... Read More

AmitDiwan
658 Views
When it is required to create a mirror copy of a tree, and display it using breadth first search, a binary tree class is created with methods set the root element, insert element to left, insert element to right, search for a specific element, and perform post order traversal and ... Read More

AmitDiwan
485 Views
When it is required to implement depth first search using post order traversal, a tree class is created with methods to add element, search for a specific element, and perform post order traversal and so on. An instance of the class is created, and it can be used to access ... Read More