Skip to content
All Medium Articles
Output of following program #include<iostream> using namespace std;    class Base { public:     virtual void show() { cout<<" In Base \n"; } };    class… Read More
Predict output of the following program #include<iostream> using namespace std;    class Base { public:     virtual void show() { cout<<" In Base \n"; } };… Read More
Given a stream of characters, find the first non-repeating character from stream. You need to tell the first non-repeating character in O(1) time at any… Read More
#include<iostream> using namespace std;    class Base { public:     void show()     {         cout<<" In Base ";     } };    class Derived: public Base { public:… Read More
Hello Everyone!! Recently, I have been through the interview experience of Amazon India and I would like to share my experience with everyone. Position :… Read More
Online round: 1. There exist a binary tree with each node containing a character (lower case letters for leaf nodes and upper case letters for… Read More
Given a directed graph and two vertices in it, source ‘s’ and destination ‘t’, find out the maximum number of edge disjoint paths from s… Read More
itoa function converts integer into null-terminated string. It can convert negative numbers too. The standard definition of itoa function is give below:- char* itoa(int num,… Read More
Given a binary tree, a complete path is defined as a path from root to a leaf. The sum of all nodes on that path… Read More
#include<iostream>     using namespace std; class P { public:    void print()  { cout <<" Inside P"; } };     class Q : public P {… Read More
Predict the output? #include<stdlib.h> #include<stdio.h> #include<iostream>    using namespace std;    class Test {     int x; public:     void* operator new(size_t size);     void operator delete(void*);     Test(int… Read More
NetApp is a leading company of innovative storage and data management solutions that helps organizations around the world store, manage, protect, and retain their data.… Read More
  Given a Weighted Directed Acyclic Graph (DAG) and a source vertex s in it, find the longest distances from s to all other vertices… Read More
Written: 20 MCQ on basics of C, OS, Networking + 2 Coding. 1) Left view of Binary Tree. 2) Rotate a matrix by 90 degree.… Read More
Hello everyone, I recently got selected for the internship at Microsoft IDC. GeeksForGeeks helped me a lot in preparing for the coding tests as well… Read More
Predict the output of following C program #include <stdio.h> int main() {     int i = 0;     do     {         printf("GeeqsQuiz ");         i = i++;     }     while… Read More
Hello everyone! Recently I sat for an on-campus internship recruiting process of Amazon. The process consisted of a written round followed by two face to… Read More
The written round was relatively easy. It contained 20 multiple choice questions on basic c, algorithms and finite automata. Some questions from OS and networking… Read More
Write a program that prints “GeeksforGeeks” with empty main() function. You are not allowed to write anything in main(). C language One way of doing… Read More
Let us first consider the following Java program as a simple example of Overriding or Runtime Polymorphism. class Base {   public void fun() {      System.out.println("Base… Read More