• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to secondary sidebar

GoHired

Interview Questions asked in Google, Microsoft, Amazon

Join WeekEnd Online Batch from 4-April-2020 on How to Crack Coding Interview in Just 10 Weeks : Fees just 20,000 INR

  • Home
  • Best Java Books
  • Algorithm
  • Internship
  • Certificates
  • About Us
  • Contact Us
  • Privacy Policy
  • Array
  • Stack
  • Queue
  • LinkedList
  • DP
  • Strings
  • Tree
  • Mathametical
  • Puzzles
  • Graph

Binary Tree

Print all nodes that are at distance k from a leaf node

October 9, 2014 by Dhaval Dave

Given a Binary Tree and a positive integer k, print all nodes that are distance k from a leaf node.

Here the meaning of distance k from a leaf means k levels higher than a

… Read More

Filed Under: Amazon Interview Question, Flipkart Interview Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Binary Tree, tree

Check Binary Tree is Binary Search Tree or not

July 29, 2014 by Dhaval Dave

To search Binary Search Tree
First lets understand characteristics of BST
• The left subtree of a node contains only nodes with keys less than the node’s key.
• The right subtree of a node
… Read More

Filed Under: Interview Questions, problem Tagged With: Binary Search Tree, Binary Tree, BST, tree

Print vertical sum of all the axis in the given binary tree

July 15, 2014 by Dhaval Dave

Print Vertical Sum of all the axis in the given binary Tree.

Most of times in written test , you will encounter this very good question.
given a binary tree.
(most of times a complete
… Read More

Filed Under: Amazon Interview Question, Flipkart Interview Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Binary Tree, tree

Inorder and Preorder traversals of a Binary Tree given. Output the Postorder traversal of it.

March 25, 2014 by Dhaval Dave

Generate Postorder traversal of Tree from Inorder and Preorder traversal of tree without generating Tree.

Input:
In-order traversal in[] = {4, 2, 5, 1, 3, 6}
Pre-order traversal pre[] = {1, 2, 4, 5, 3, 
… Read More

Filed Under: Adobe Interview Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Binary Tree, tree

Binary Tree in Java

March 19, 2014 by Dhaval Dave

Implementation of Binary Tree in Java Language.

import java.io.*;
import java.util.*;
class Node
   {
   public int iData;              // data item (key)
   public double dData;           // data item
   public Node leftChild;         // this node's left child
   
… Read More

Filed Under: problem Tagged With: Binary Tree, Java

BFS (Breath First Search)

March 1, 2014 by Dhaval Dave

In graph theory, breadth-first search (BFS) is a strategy for searching in a graph when search is limited to essentially two operations: (a) visit and inspect a node of a graph; (b) gain access to

… Read More

Filed Under: problem Tagged With: Binary Tree, Graph, tree

DFS (Depth First Search)

March 1, 2014 by Dhaval Dave

DFS BFS Graph traversal

Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores

… Read More

Filed Under: problem Tagged With: Binary Tree, Graph, tree

  • « Previous Page
  • Page 1
  • Page 2

Primary Sidebar

Join WeekEnd Online/Offline Batch from 4-April-2020 on How to Crack Coding Interview in Just 10 Weeks : Fees just 20,000 INR

Join WeekEnd Online/Offline Batch from 4-April-2020

WhatsApp us

Secondary Sidebar

Custom Search

  • How I cracked AMAZON
  • LeetCode
  • Adobe
  • Amazon
  • Facebook
  • Microsoft
  • Hacker Earth
  • CSE Interview

Top Rated Questions

Find if a binary tree is height balanced ?

Check if an array has duplicate numbers in O(n) time and O(1) space

Stickler thief

Find the number ABCD such that when multipled by 4 gives DCBA.

Binary Tree in Java

HackeEarth Flipkart’s Drone

write a c program that given a set a of n numbers and another number x determines whether or not there exist two elements in s whose sum is exactly x

Maximum sum contiguous subarray of an Array

Client Server C program

Reliance Jio Software Developer Interview Experience

C Program for TAIL command of UNIX

Facebook Interview Question : Interleave List

Implement a generic binary search algorithm for Integer Double String etc

Reversal of LinkedList

N Petrol bunks or City arranged in circle. You have Fuel and distance between petrol bunks. Is it possible to find starting point so that we can travel all Petrol Bunks

Flipkart SDET Interview Experience

strtok()

C++ OOPs Part1

LeetCode : Word Search

Given Set of words or A String find whether chain is possible from these words or not

Level order traversal in Spiral form

Amazon Interview Experience – SDE Chennai

Python Array String

Printing intermediate Integers between one element & next element of array

Connect n ropes with minimum cost

Handle duplicates in Binary Search Tree

N teams are participating. each team plays twice with all other teams. Some of them will go to the semi final. Find Minimum and Maximum number of matches that a team has to win to qualify for finals ?

Minimum insertions to form a palindrome

Generate largest number arranging a no. of given non negative integer numbers

Find Pythagorean Triplets in an array in O(N)

Copyright © 2025 · Genesis Framework · WordPress · Log in