Skip to content
All Medium Articles
I have a total experience of two years. I am sharing my interview experience with Amazon. This is for SDE1 Amazon. A very big thanks… Read More
I recently went through the Amazon interview process for the post of SDE-1. Round 1 (Written) 1. Given an array, output an array where every… Read More
class Test {     public static void main(String args[])  {        System.out.println(10  +  20 + "GeeksQuiz");         System.out.println("GeeksQuiz" + 10 + 20);     }   } (A) 30GeeksQuiz GeeksQuiz30 (B)… Read More
Hello geeks, Last month I appeared for the Internship Interview of Amazon. What my personal experience says is that never try to jump to the… Read More
Introduction: A red-black tree is a kind of self-balancing binary search tree where each node has an extra bit, and that bit is often interpreted… Read More
#include <stdio.h> #include <stdlib.h>    int main(void) {     int i;     int *ptr = (int *) malloc(5 * sizeof(int));        for (i=0; i<5; i++)         *(ptr +… Read More
  We have discussed BST search and insert operations. In this post, the delete operation is discussed. When we delete a node, three possibilities arise. 1)… Read More
/* C Program to count the Number of Lines in a Text File  */ #include <stdio.h> #define MAX_FILE_NAME 100    int main() {     FILE *fp;… Read More
Which of the following statements is true for every planar graph on n vertices? (A) The graph is connected (B) The graph is Eulerian (C)… Read More
We basically ignore half of the elements just after one comparison.   Compare x with the middle element. If x matches with the middle element, we… Read More
We strongly recommend to read following post on suffix trees as a pre-requisite for this post.Pattern Searching | Set 8 (Suffix Tree Introduction)A suffix array… Read More
Assume that the size of char is 1 byte and negatives are stored in 2’s complement form #include<stdio.h> int main() {     char c = 125;… Read More
#include <stdio.h> void f(char**); int main() {     char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" };     f(argv);     return 0; } void f(char **p)… Read More
Consider the data of previous question. Suppose that the sliding window protocol is used with the sender window size of 2^i where is the number… Read More
Frames of 1000 bits are sent over a 10^6 bps duplex link between two hosts. The propagation time is 25ms. Frames are to be transmitted… Read More
Consider the following relational schema: Suppliers(sid:integer, sname:string, city:string, street:string) Parts(pid:integer, pname:string, color:string) Catalog(sid:integer, pid:integer, cost:real) Assume that, in the suppliers relation above, each supplier and… Read More
Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy… Read More
Assume that the size of int is 4. #include <stdio.h> void f(char**); int main() {     char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl"… Read More
#include<stdio.h> int main() {     int a[10][20][30] = {0};     a[5][2][1] = 2;     return 0; } Which of the following will print the value 2 for the… Read More
The binary operation c is defined as follows P Q PcQ T T T T F T F T F F F T Which one… Read More