Team : Transportation Location :Hyderabad Round 1 (Online Test) Q1. Find the kth largest value in a BST Q2. Swap the alternate nodes in a singly linked… Read More »

Written Round: 1) Given a binary tree, such that each node contains a number. Find the maximum possible sum in going from one leaf node… Read More »

Given a sorted array keys[0.. n-1] of search keys and an array freq[0.. n-1] of frequency counts, where freq[i] is the number of searches to… Read More »

There are some glasses with equal capacity as 1 litre. The glasses are kept as follows: 1 2 3 4 5 6 7 8 9… Read More »

I am very thankful to geeksforgeeks team for such a great site. I got offer from Amazon. Written Test It was online test on interviewstreet.… Read More »

We are given an array of n points in the plane, and the problem is to find out the closest pair of points in the… Read More »

In my previous post, I have explained about longest increasing sub-sequence (LIS) problem in detail. However, the post only covered code related to querying size of… Read More »

We recommend to read following two posts as a prerequisite of this post. 1. Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST)) 2.… Read More »

Recently I got interviewed at Amazon Hyderabad. I just wanted to share my experience. Hope someone gets little help from this. 1. Telephonic a. In… Read More »

Given a stream of numbers, generate a random number from the stream. You are allowed to use only O(1) space and the input is in… Read More »

One of the most used optimization techniques in the Linux kernel is ” __builtin_expect”. When working with conditional code (if-else statements), we often know which… Read More »

Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be… Read More »

About four months of gap (missing GFG), a new post. Given an M x N matrix, transpose the matrix without auxiliary memory.It is easy to… Read More »

Given a string, move all even positioned elements to end of string. While moving elements, keep the relative order of all even positioned and odd… Read More »

Given preorder traversal of a binary search tree, construct the BST. For example, if the given traversal is {10, 5, 1, 7, 40, 50}, then… Read More »

Given a string, print all permutations of it in sorted order. For example, if the input string is “ABC”, then output should be “ABC, ACB,… Read More »

Given two arrays that represent preorder and postorder traversals of a full binary tree, construct the binary tree. A Full Binary Tree is a binary… Read More »

I have recently been through the recruitment process of ADOBE. I didn’t get through (I got the reply today), but I sincerely hope that my… Read More »

Given an array where every element occurs three times, except one element which occurs only once. Find the element that occurs once. Expected time complexity… Read More »