Category: Amazon Questions

0

Inorder Successor in Binary Tree

Algorithms – Inorder Successor in Binary Tree Objective: Given a Binary tree (Not binary Search Tree ), find the inorder successor of a node. What is Inorder Successor: Inorder successor of a node is...

3

Sorted Array to Binary Search Tree of Minimal Height

Objective: Given a sorted array with unique elements, Create a binary search tree with minimal height. Why minimal height is important : We can do the linear scan to the array and make the...

1

In a Binary Tree, Create Linked Lists of all the nodes at each depth.

Objective: Given a Binary tree create Linked Lists of all the nodes at each depth , say if the tree has height k then create k linked lists. NOTE : This problem is very...

4

Add two numbers represented by a linked list, Numbers are Stored in FORWARD order

This post is the extension of   – Two numbers represented by a linked list, Number Stored in REVERSE order Objective: Two numbers represented by a linked listwhere each node contains single digit. The digits...

%d bloggers like this: