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

All Medium Articles

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 define… 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… 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, consider… 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

Predict the output of following C++ programTake a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and… 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

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: Attention reader! Don’t stop… 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

Which of the following operators cannot be overloaded (A) . (Member Access or Dot operator) (B) ?: (Ternary or Conditional Operator ) (C) :: (Scope… 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