Smallest Greater Element on Right Side

Given an array of distinct elements, print the Closest Greater Element (NGE) for every element. The closest greater Element for an element x is the… Read More »

Floor in Binary Search Tree (BST)

Given a Binary Search Tree and a number x, find floor of x in the given BST. Input : x = 14 and root of… Read More »

Nutanix Interview Experience (On-Campus)

Online Round: This round was held on Hackerrank for 1:30 hrs. There were two questions in this round. A tree was given with upto 10^5 nodes.… Read More »

Nutanix Interview Experiance – Campus Placements

Nutanix Technologies came to our campus BITS Goa for On-Campus Recruitment process. They conducted multiple rounds of screening to finally select 3 Candidates. Online Test:… Read More »

Sum of cousin nodes of a given node in a BST

Given a binary search tree and a number N, the task is to find the sum of the cousins of the given node N if… Read More »

Amazon Interview Experience

Round: I An Array arr={7, 7, 8, 8, 9, 1, 1, 4, 2, 2} has numbers appearing twice or once. Duplicates appear side by side… Read More »

OYO Rooms Interview Experience (On-Campus)

Round 1: Round 1 was for 200 marks. 25 MCQs and 2 coding questions .The MCQs were mostly on aptitude and some were Technical (C++… Read More »

Microsoft Interview experience | Set 178 (On-Campus Internship for IDC)

There were a total of 3 rounds. 1st was online coding, 2nd was written coding and last round was divided in three parts, basically 3… Read More »

Inorder predecessor and successor for a given key in BST | Iterative Approach

Given a BST and a key. The task is to find the inorder successor and predecessor of the given key. In case, if either of… Read More »

Find postorder traversal of BST from preorder traversal

Given an array representing preorder traversal of BST, print its postorder traversal. Examples: Input : 40 30 35 80 100 Output : 35 30 100… Read More »

Find the closest element in Binary Search Tree | Space Efficient Method

Given a binary search tree and a target node K. The task is to find the node with the minimum absolute difference with given target… Read More »

Smallest number in BST which is greater than or equal to N

Given a Binary Search Tree and a number N, the task is to find the smallest number in the binary search tree that is greater… Read More »

Sum of k largest elements in BST

Given a BST, the task is to find the sum of all elements greater than and equal to kth largest element. Examples: Input : K… Read More »

Convert BST to Max Heap

Given a Binary Search Tree which is also a Complete Binary Tree. The problem is to convert a given BST into a Special Max Heap… Read More »

Self-Balancing-Binary-Search-Trees (Comparisons)

Self-Balancing Binary Search Trees are height-balanced binary search trees that automatically keeps height as small as possible when insertion and deletion operations are performed on… Read More »