• 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

Rectangular chocolate bar Create at least one piece which consists of exactly nTiles tiles

Check Binary Tree is Binary Search Tree or not

Best Java Book | Top Java Programming Book for Beginners

Find Pythagorean Triplets in an array in O(N)

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

Skiing on Mountains Matrix

Binary Tree in Java

Circular Linked List

Find loop in Singly linked list

Implement a generic binary search algorithm for Integer Double String etc

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

CodeChef Code SGARDEN

Subset Sum Problem Dynamic programming

‘N’ Story Building, with 1,2,3 steps how many ways can a person reach top of building.

How Radix sort works

Binary Tree in Java

Word Break Problem

DFS (Depth First Search)

Find and print longest consecutive number sequence in a given sequence in O(n)

Find the smallest window in a string containing all characters of another string

BFS (Breath First Search)

Python String and numbers

SAP Off Campus Hiring_ March 2015 Computer Skills

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 ?

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

Convert Decimal to Roman numbers / Romanizer HackerEarth Code

C Program for TAIL command of UNIX

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

The greedy coins game Dynamic Programming

How strtok() Works

Copyright © 2025 · Genesis Framework · WordPress · Log in