All Medium Articles

## Euler Circuit in a Directed Graph 3.7

Eulerian Path is a path in graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path which starts and ends on the… Read More »

## Check if a binary tree is subtree of another binary tree | Set 2 3.4

Given two binary trees, check if the first tree is subtree of the second one. A subtree of a tree T is a tree S… Read More »

## Draw a circle without floating point arithmetic 3.7

Given a radius of a circle, draw the circle without using floating point arithmetic. Following program uses a simple concept. Let the radius of the… Read More »

## Comparison of a float with a value in C 3.1

Predict the output of following C program. filter_none edit close play_arrow link brightness_4 code #include<stdio.h> int main() {     float x = 0.1;     if (x ==… Read More »

## C | Data Types | Question 9 3.4

Output of following program? filter_none edit close play_arrow link brightness_4 code #include<stdio.h> int main() {     float x = 0.1;     if ( x == 0.1 )… Read More »

## Anagram Substring Search (Or Search for all permutations) 3.3

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or… Read More »

## Maximum Sum Path in Two Arrays 3

Given two sorted arrays, such that the arrays may have some common elements. Find the sum of the maximum sum path to reach from the… Read More »

## Find next greater number with same set of digits 3.3

Given a number n, find the smallest number that has same set of digits as n and is greater than n. If n is the… Read More »

## Amazon Interview | Set 96 (On-Campus for Internship) 3

I’m a 3rd year grad and amazon visited our campus. My interview had only 3 rounds. Round 1 (Online round 20 MCQ’s and 2 coding… Read More »

## Commonly Asked Algorithm Interview Questions | Set 1 3.4

What is an algorithm? Informally, an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some… Read More »

## Pure virtual destructor in C++ 3.2

Can a destructor be pure virtual in C++? Yes, it is possible to have pure virtual destructor. Pure virtual destructors are legal in standard C++… Read More »

In C++, stream insertion operator “<<” is used for output and extraction operator “>>” is used for input. We must know following things before we… Read More »

## Count Possible Decodings of a given Digit Sequence 3.4

Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence. Examples: Input:… Read More »

## Amazon Interview | Set 95 (For SDE-I) 3

Hi, Below is my interview experience for Amazon for SDE-I position. Round-1(F2F) 1.) Traverse a binary tree in a spiral manner. (zig-zag manner) 2.) Given… Read More »

## [TopTalent.in] Interview with Rishav who got a job offer from one of the core companies, Qualcomm 3.4

Engineers from core branches like Electronics, Mechanical, Chemical today are often found chasing lucrative employment in fields like IT and analytics, areas unrelated to what… Read More »

## Find the maximum path sum between two leaves of a binary tree 3.7

Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. The maximum… Read More »

## A Programmer’s approach of looking at Array vs. Linked List 3

In general, array is considered a data structure for which size is fixed at the compile time and array memory is allocated either from Data… Read More »

## GATE | GATE-CS-2006 | Question 85 3.5

Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then… Read More »