Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, GeeksforGeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
For each element in a set of size 2n, an unbiased coin is tossed. The 2n coin tosses are independent. An element is chosen if… Read More
Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then… Read More
(A) L1 only (B) L3 Only (C) L1 and L2 (D) L2 and L3 Answer: (D) Explanation: A PDA can be built only for L1.… Read More
Inorder traversal of a Binary tree can either be done using recursion or with the use of a auxiliary stack. The idea of threaded binary… Read More
1. Phone Interview a. Given sorted array in decreasing order. Find first occurrence of given key. b. Find diameter of a binary tree. 2. Face… Read More
Priority Queue is an extension of queue with following properties. Every item has a priority associated with it. An element with high priority is dequeued… Read More
Constructor is a special member function that is automatically called by compiler when object is created and destructor is also special member function that is… Read More
This problem is known as Clock angle problem where we need to find angle between hands of an analog clock at a given time.Examples:  Input:… Read More
The Postfix notation is used to represent algebraic expressions. The expressions written in postfix form are evaluated faster compared to infix notation as parenthesis are… Read More
What is in-place sorting? An in-place sorting algorithm uses constant extra space for producing the output (modifies the given array only). It sorts the list… Read More
Given a Perfect Binary Tree, reverse the alternate level nodes of the binary tree.  Given tree: a / \ b c / \ / \… Read More
Armed with a dual degree from IIT, Madras, and a very strong resume, Prashanth Srikanthan was destined to land a lucrative offer from one of… Read More
Applied through LinkedIn Online Coding Round (Interviewstreet) One of the many ways of representing a tree is to have an array(of length same as a… Read More
Given a BST, transform it into a greater sum tree where each node contains sum of all nodes greater than that node. We strongly recommend… Read More
What is a Thread? A thread is a single sequence stream within in a process. Because threads have some of the properties of processes, they… Read More