Skip to content
All Medium Articles
  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
Which of the following operators should be preferred to overload as a global function rather than a member method? (A) Postfix ++ (B) Comparison Operator… 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. Java class Base {   public void fun() {… Read More
I would like to thank the entire Geeksforgeeks team, whose contribution has helped me a lot in my preparation for the interviews and getting placed… Read More
#include<stdio.h>    int main() {     char *s = "Geeks Quiz";     int n = 7;     printf("%.*s", n, s);     return 0; } (A) Geeks Quiz (B) Nothing… Read More
#include <stdio.h> char *fun() {     static char arr[1024];     return arr; }    int main() {     char *str = "geeksforgeeks";     strcpy(fun(), str);     str = fun();     strcpy(str,… Read More
The worst case search time for a sorted linked list is O(n). With a Balanced Binary Search Tree, we can skip almost half of the… Read More
Phone screen – I  1. Fibonacci series without using an array – this is a typical favorite question w.r.t. Dynamic Programming where you will ask… Read More
Given a rope of length n meters, cut the rope in different parts of integer lengths in a way that maximizes product of lengths of… Read More
The lower bound for Comparison based sorting algorithm (Merge Sort, Heap Sort, Quick-Sort .. etc) is Ω(nLogn), i.e., they cannot do better than nLogn.  Counting… Read More
Output of following program #include <stdio.h> int fun(char *p) {     if (p == NULL || *p == '\0') return 0;     int current = 1, i… Read More
Oracle Interview-Server Tech. ========== Round 1: ========== 1. Explain Tree traversals. Given a inorder and postorder construct a tree 2. What is fork? How many… Read More
In C++, const qualifier can be applied to 1) Member functions of a class 2) Function arguments 3) To a class data member which is… Read More
Assume that an integer and a pointer each takes 4 bytes. Also, assume that there is no alignment in objects. Predict the output following program.… Read More

Start Your Coding Journey Now!