• 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

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

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

Trie Dictionary

April 14, 2015 by Dhaval Dave

tries

Trie also called prefix tree (as they can be searched by prefixes).
The term trie comes from retrieval.
In the example shown, keys are listed in the nodes and values below them. Each … Read More

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

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

Puzzle : 100 doors in a row Visit and Toggle the door. What state the door will be after nth pass ?

Generate next palindrome number

There are N nuts and N bolts, u have to find all the pairs of nuts and bolts in minimum no. of iteration

Maximum sum contiguous subarray of an Array

Sort Stack in place

Best Java Book | Top Java Programming Book for Beginners

DFS (Depth First Search)

Amazon Interview Experience – SDE Chennai

Test Cases for Round Function

ADOBE Aptitude C Language Test

Walmart Labs Interview Experience

C++ OOPs Part2

Find Percentage of Words matching in Two Strings

VMWare Openings

Implement LRU Cache

SAP Interview Questions

1014 Practice Question of New GRE – Princeton

Adobe Interview Questions 8 month Exp

Facebook Interview Question : Interleave List

Minimum insertions to form a palindrome

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

Subset Sum Problem Dynamic programming

Find min element in Sorted Rotated Array (With Duplicates)

25 horses 5 tracks Find 3 fastest puzzle

SAP Hiring Off-Campus General Aptitude

Advanced SQL Injection

robot standing at first cell of an M*N matrix. It can move only in two directions, right and down. In how many ways, it can reach to the last cell i.e. (M, N) Code it

Introduction To Number Theory ( Part 1 )

Trapping Rain Water

building with N steps, we can take 1,2,3 steps calculate number of ways to reach at top of building

Copyright © 2025 · Genesis Framework · WordPress · Log in