All Hard Articles
Following statement is true or false? If we make following changes to Dijkstra, then it can be used to find the longest simple path, assume… Read More
Pre-Requisite: B-Tree | Set 1 (Introduction), B-Tree | Set 2 (Insert) B Trees is a type of data structure commonly known as a Balanced Tree… Read More
Predict the output of following C++ program. #include <iostream> using namespace std;    class A { private:     int x; public:     A(int _x)  {  x =… Read More
NP-complete problems are a subset of the larger class of NP (nondeterministic polynomial time) problems. NP problems are a class of computational problems that can… Read More
How can we make a C++ class such that objects of it can only be created using new operator? If user tries to create an… Read More
I recently got interviewed for a position in Cisco. The organization came to our college as part of their University recruitment program. The following is… Read More
1) (Telephonic round 1) a. Print a matrix in spiral order (Code) Soln: Solved it using recursion. Each recursive call was supposed to print boundary elements. On… Read More
Eulerian Path is a path in a graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path that starts and ends on the… Read More
Morgan Stanley campus placement for post IT analyst. 1st round – objective written test 10 questions on aptitude and analytics 30 questions on programming 10… Read More
Output? #include<iostream> #include<string.h> using namespace std;    class String {     char *str; public:      String(const char *s);      void change(int index, char c) { str[index] = c;… Read More
Predict the output of following C++ program. #include<iostream> using namespace std;    class Test { private:   int x; public:   Test(int x = 0) { this->x… Read More
Predict the output of following program. #include<iostream> #include<stdlib.h> using namespace std;    class Test { public:    Test()    { cout << "Constructor called"; } };   … Read More
What is the output of following program? #include <iostream> using namespace std;    class Point {     int x, y; public:    Point(const Point &p) { x… Read More
First of all, a very very big thanks to whole team of geeks for geeks. It is because of them only that I was able… Read More
A matching in a Bipartite Graph is a set of the edges chosen in such a way that no two edges share an endpoint. A… Read More
Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of… Read More
Given an array Set[ ] of sorted integers having no duplicates, find the length of the Longest Arithmetic Progression (LLAP) subsequence in it. Examples:  Input:… Read More
Given a linked list, apply the Quick sort algorithm to sort the linked list. The important things about implementation are, that it changes pointers rather… Read More
Given a sequence of non-negative integers, find the subsequence of length 3 having maximum product with the numbers of the subsequence being in ascending order.… Read More
Given two arrays that represent a sequence of keys. Imagine we make a Binary Search Tree (BST) from each array. We need to tell whether… Read More