Longest consecutive Sequence
Send Feedback
You are given with an array of integers that contain numbers in random order. Write a program to find the longest possible sequence...
Implement the BST class which includes following functions -
1. search
Given an element, find if that is present in BSt or not. Return true or false.
2. insert -
Given an element,...
Given a binary tree, write code to create a separate linked list for each level. You need to return the array which contains head of each level linked list.
Input format :
Elements...
Construct BST
Send Feedback
Given a sorted integer array A of size n which contains all unique elements. You need to construct a balanced BST from this input array. Return...
Elements Between K1 and K2
Send Feedback
Given a Binary Search Tree and two integers k1 and k2, find and print the elements which are in range k1 and k2 (both inclusive).
Print...
Search In BST
Send Feedback
Given a BST and an integer k. Find if the integer k is present in given BST or not. Return the node with data k if it is present, return null otherwise.
Assume...
DBS Bank online hiring challenge:-
DBS Bank has announced their online hiring challenge for 2020 batch student. Students who has good command in programming language and have problem...