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 in… 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 filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {     int i = 0;     do     {… 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
C
C++
Let us first consider the following Java program as a simple example of Overriding or Runtime Polymorphism. filter_none edit close play_arrow link brightness_4 code class… 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
filter_none edit close play_arrow link brightness_4 code #include<stdio.h>    int main() {     char *s = "Geeks Quiz";     int n = 7;     printf("%.*s", n, s);     return… Read More
filter_none edit close play_arrow link brightness_4 code #include <stdio.h> char *fun() {     static char arr[1024];     return arr; }    int main() {     char *str =… 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 asked… 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
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
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
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
Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we… 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
Predict the output of following program filter_none edit close play_arrow link brightness_4 code #include<stdio.h> int main() {     int a = 12;     void *ptr = (int… Read More