January 13, 2021

## Binary Search Tree

We would cover the Binary Search Tree implementation in Java under the following: Introduction to Binary Search Tree Java Program for Binary Search Tree Inserting …

## Question 5 – Find Largest Sub-array

Question 5 You are given an unsorted array of integers. You  need to find the largest sub-array formed by consecutive numbers. The sub-array should only …

## Question 4: Find Duplicate Element in Array

Question 4 You are given an array of size n. One of the elements of the array appears twice in the array. Every other element …

## Question 3 – Sort a Binary Array in Linear Time

Question 3 Given an unsorted binary array, you need to sort it in linear time – O(n) and constant space O(1). Input: [0, 1, 1, …

## Question 2: Check if Subarray with Zero Sum Exists

Question 2 You are given an integer array. You need to check if the array contains sub-array with zero sum. For example: Input: A = …

## Question 1: Find Pair With Given Sum in an Array

Question 1 Given an array of integers, you must find a pair within the array that sums up to a given sum. We assume the …