• 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

LeetCode: Binary Tree Maximum Path Sum

October 5, 2019 by Arshdeep Singh

Given a non-empty binary tree, find the maximum path sum.

For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child … Read More

Filed Under: Amazon Interview Question, Data Structure, Flipkart Interview Questions, Google, LeetCode, Microsoft Interview Questions Tagged With: Binary Tree, tree

Diagonal Traversal of Binary Tree

February 23, 2018 by Dhaval Dave

Given a Binary Tree, print the diagonal traversal of the binary tree
Consider lines of slope -1 passing between nodes. Given a Binary Tree, print all diagonal elements in a binary tree belonging to same … Read More

Filed Under: Adobe Interview Questions, Amazon Interview Question, Interview Questions, Microsoft Interview Questions, Tree Tagged With: BFS, Binary Tree, tree

Handle duplicates in Binary Search Tree

April 17, 2017 by Dhaval Dave

In a Binary Search Tree (BST), all keys in left subtree of a key must be smaller and all keys in right subtree must be greater. So a Binary Search Tree by definition has distinct … Read More

Filed Under: Amazon Interview Question, Flipkart Interview Questions, Hacker Earth Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Binary Search Tree, Binary Tree

Binary Tree Isomorphic to each other

March 22, 2017 by Dhaval Dave

Isomorphic tree

Find weather two given trees are isomorphic to each other or not.
Lets understand What is isomorphic strings

AAB and XXY are IsoMorphic to each other, consider A replaces/morphs as X and B as Y, … Read More

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

Right view of Binary tree

July 24, 2016 by Dhaval Dave

We are given a Binary Tree, Print the Right view of Binary tree,
Right view of binary tree is  : List of all nodes which are visible If you look at Binary tree from right … Read More

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

Maximum path sum between two leaves

May 11, 2015 by Dhaval Dave

maximum path sum between two leaves

If a binary tree is given, how to find Maximum path sum between two leaves  of binary tree.

All should be numbers
The maximum sum path may or may not go through root. For example,
… Read More

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

Mirror of Tree

February 10, 2015 by Dhaval Dave

Write a code to construct a Mirror of Binary Tree as below.

… Read More

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

Find if a binary tree is height balanced ?

January 12, 2015 by Dhaval Dave

A Height Balanced Tree is tree where for each node this condition is true.
– The difference between heights of left subtree and right subtree for any node is not more than 1.So we can
… Read More

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

Level order traversal in Spiral form

December 21, 2014 by Dhaval Dave

Write a function to print spiral order traversal of a tree or Write function for Tree traversal in Spiral ZigZag form
For below tree, function should print 1, 2, 3, 7, 6, 5, 4.

           [1]
          
… Read More

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

Common Ancestor in a Binary Tree or Binary Search Tree

October 10, 2014 by Dhaval Dave

We need to find a Least Common Ancestor of Two given nodes in Binary tree.

            [1]
          /    \ 
       [2]      [3]
      /  \      /  \
    [4]  [5]  [9] [10]
    /    /  \ 
  [8]   [6] [7]

say

… Read More

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

  • Page 1
  • Page 2
  • Next Page »

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

Maximum of all subarrays of size k

Subset Sum Problem Dynamic programming

Given a sorted array and a number x, find the pair in array whose sum is closest to x

How strtok() Works

Difference between a LinkedList and a Binary Search Tree BST

VMWare Openings

Templates in C++

Singly linked list

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

Facebook Interview Question : Interleave List

Sequence Finder Dynamic Programming

Edit Distance ( Dynamic Programming )

Connect n ropes with minimum cost

Implement LRU Cache

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

Get K Max and Delete K Max in stream of incoming integers

Convert number to words java

TicTacToe Game As Asked in Flipkart

Introduction To Number Theory ( Part 1 )

Sort an array according to the order defined by another array

Printing intermediate Integers between one element & next element of array

simple sql injection

VMWare SDEII Interview

SAP Hiring Off-Campus General Aptitude

Calculate price of parking from parking start end time prices

Walmart Labs Interview Experience

C++ OOPs Part1

Binary Tree in Java

Find two non repeating elements in an array of repeating elements

Fibonacci Hashing & Fastest Hashtable

Copyright © 2025 · Genesis Framework · WordPress · Log in