
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
117 Views
To find the length for the diagonal of a regular pentagon we put the value of side in (1+√5)side/2 = (1+2.24)side/2.ExampleLet us see the following implementation to get the regular Heptagon diagonal from its side − Live Demo#include using namespace std; int main(){ float side = 5; if ... Read More

AmitDiwan
162 Views
The regular hexagons are comprised of six equilateral triangles so the diagonal of a regular hexagon would be 2*side.ExampleLet us see the following implementation to get the regular Heptagon diagonal from its side − Live Demo#include using namespace std; int main(){ float side = 12; if (side < ... Read More

AmitDiwan
370 Views
To use Deterministic Finite Automaton(DFA) to find strings that aren’t ending with the substring “THE”. We should keep that in mind that any variation of the substring “THE” like “tHe”, “The” ,”ThE” etc should not be at the end of the string.First, we define our dfa variable and initialise it ... Read More

AmitDiwan
242 Views
The Deterministic Finite Automaton(DFA) is used for checking if a number is divisible by another number k or not. The algorithm is useful because it can also find the remainder if the number isn’t divisible.In DFA based division we build a DFA table with k states. We consider binary representation ... Read More

AmitDiwan
121 Views
In a N sided polygon if two children are standing on A and B vertex then we need to determine the vertex number where another person should stand so that there should be minimum number of jumps required by that person to reach A and B both.Two conditions to note ... Read More

AmitDiwan
129 Views
The objective is to determine the number of squares a line will pass through given two endpoints (x1, y1) and (x2, y2).To find the number of squares through which our line pass we need to find : difference between the x points (dx) = x2-x1, difference between the y points ... Read More

AmitDiwan
1K+ Views
The determinant of a matrix can be calculated only for a square matrix by multiplying the first row cofactor by the determinant of the corresponding cofactor and adding them with alternate signs to get the final result.$$A = \begin{bmatrix}a & b & c\d & e &f \g & h &i ... Read More

AmitDiwan
1K+ Views
A number whose sum of its digits powered with its respective position equals to the number itself is called a disarium number.The noOfDigits(int num) function takes the number and return the number of digits by constantly dividing the number by 10 while there is only ones place left. On each ... Read More

AmitDiwan
117 Views
Let us first define the struct that would represent a tree node that contains the int key and its left and right node child. If this is the first node to be created then it’s a root node otherwise a child node.struct Node { int data; struct Node ... Read More

AmitDiwan
281 Views
Let us first define the struct that would represent a tree node that contains a character key and a vector of Node *.struct Node{ char key; vector children; };Next we create our createNode(int key) function that takes an int key value and assign it to the key member ... Read More