All Hard Articles

## C | Arrays | Question 10 4

Predict output of following program filter_none edit close play_arrow link brightness_4 code int main() {     int i;     int arr[5] = {1};     for (i = 0;… Read More »

## Delete Operation in B-Tree 4.6

It is recommended to refer following posts as prerequisite of this post. B-Tree | Set 1 (Introduction) B-Tree | Set 2 (Insert) B-Tree is a… Read More »

## C++ | const keyword | Question 1 4.3

Predict the output of following program filter_none edit close play_arrow link brightness_4 code #include <iostream> using namespace std; int main() {     const char* p =… Read More »

## NP-Completeness | Set 1 (Introduction) 4.1

We have been writing about efficient algorithms to solve complex problems, like shortest path, Euler graph, minimum spanning tree, etc. Those were all success stories… Read More »

## Cisco Interview | Set 2 4.6

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 »

## Cisco Interview | Set 1 4.3

The interview process consisted of 4 rounds. Round 1: APTITUDE + C + ELECTRONICS MCQs (No negative marking) The aptitude questions had a good mix… Read More »

## Fleury’s Algorithm for printing Eulerian Path or Circuit 4.2

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 same… Read More »

## Morgan Stanley Interview | Set 1 4

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 »

## C++ | Constructors | Question 17 4

Output? filter_none edit close play_arrow link brightness_4 code #include<iostream> #include<string.h> using namespace std;    class String {     char *str; public:      String(const char *s);      void change(int… Read More »

## C++ | this pointer | Question 3 4

Predict the output of following C++ program. filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Test { private:   int x;… Read More »

## Amazon Interview | Set 34 4

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 »

## Find minimum s-t cut in a flow network 4

In a flow network, an s-t cut is a cut that requires the source ‘s’ and the sink ‘t’ to be in different subsets, and… Read More »

## Maximum Bipartite Matching 4.3

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 »

## Longest Arithmetic Progression | DP-35 4.5

Given a set of numbers, find the Length of the Longest Arithmetic Progression (LLAP) in it. Examples: set[] = {1, 7, 10, 15, 27, 29}… Read More »

## QuickSort on Singly Linked List 4.3

QuickSort on Doubly Linked List is discussed here. QuickSort on Singly linked list was given as an exercise. Following is C++ implementation for same. The… Read More »

## Find the Increasing subsequence of length three with maximum product 4.1

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 »

## C++ | References | Question 4 4

Predict the output of following C++ program. filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    int &fun() {     static int x… Read More »

## Check for Identical BSTs without building the trees 4.3

Given two arrays which represent a sequence of keys. Imagine we make a Binary Search Tree (BST) from each array. We need to tell whether… Read More »

## Find if a string is interleaved of two other strings | DP-33 4.3

Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to… Read More »

## Custom Tree Problem 4.5

You are given a set of links, e.g. a —> b b —> c b —> d a —> e Print the tree that would… Read More »