Skip to content
All Medium Articles
Given a polygon and a point ‘p’, find if ‘p’ lies inside the polygon or not. The points lying on the border are considered inside. … Read More
Given two line segments (p1, q1) and (p2, q2), find if the given line segments intersect with each other. Before we discuss solution, let us… Read More
Given a graph which represents a flow network where every edge has a capacity. Also given two vertices source ‘s’ and sink ‘t’ in the… Read More
Given a Binary Tree and a key, write a function that prints all the ancestors of the key in the given binary tree. For example,… Read More
Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL). The left and right pointers in nodes are to be used as previous… Read More
We have covered basic information about shared libraries in the previous post. In the current article we will learn how to create shared libraries on… Read More
Predict the output of following C++ progran #include <iostream> using namespace std;     int i;     class A { public:     ~A()     {         i=10;     } };… Read More
#include<iostream> using namespace std;    int &fun() {     int x = 10;     return x; } int main() {     fun() = 30;     cout << fun();     return… Read More
Let us first define Overloading and Overriding.Overriding: Overriding is a feature of OOP languages like Java that is related to run-time polymorphism. A subclass (or… Read More
Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words.… Read More
This article is not for those algo geeks. If you are interested in systems related stuff, just read on… Shared libraries are useful in sharing… Read More
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
Given n numbers, each with some frequency of occurrence. Return a random number with probability proportional to its frequency of occurrence. Example:  Let following be… Read More
Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if there is a path… Read More
Given an array of size n, find all elements in array that appear more than n/k times. For example, if the input arrays is {3,… Read More
Super Day Process 1st Round – Written test to be completed in 1hour 20 mins containing questions on C++, SQL and Aptitude questions. The questions… Read More
Consider a node X in a Binary Tree. Given that X has two children, let Y be Inorder successor of X. Which of the following… Read More
A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W… Read More
  Evaluate an expression represented by a String. The expression can contain parentheses, you can assume parentheses are well-matched. For simplicity, you can assume only… Read More
Given n dice each with m faces, numbered from 1 to m, find the number of ways to get sum X. X is the summation… Read More