Find the Missing Number

Problem Statement In finding the missing number from an array of 1 to N numbers we have given an array that contains N-1 numbers. One number is missing from an array of numbers from 1 to N. We have to find the missing number. Input Format First-line containing an integer …

Read more

Largest Sum Contiguous Subarray

This is one of the mostly asked question during interviews. Here interviewer loves to see a linear algorithmic approach of yours. Yes, you can find the maximum sum of elements in linear time using a single traversal of the array. Here we will be displaying the largest sum of the …

Read more

Reverse an Array

An array is the sequential collection of similar elements. The array is a fixed size data structure. Arrays can be accessed by an index that starts from zero. Reversing the array helps in arranging all the elements of an array-like we are reading elements from the end. We have given …

Read more

Translate »