# Category - JAVA

## Java Programmming – Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array

Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous sequence of 1s. Expected time complexity is O(n)

## C++ Programmming – Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array

Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous sequence of 1s. Expected time complexity is O(n)

## Java Programming -To check if two given sets are disjoint

Given two sets represented by two arrays, how to check if the given two sets are disjoint or not - It may be assumed that the given arrays.

## Java Programming – Length of the largest subarray with contiguous elements

An array of distinct integers, find length of the longest subarray which contains numbers that can be arranged in a continuous sequence.

## Java Programming – Length of the largest subarray with contiguous elements

we have discussed a solution that assumes that elements in given array are distinct. Here we discuss a solution that works even if the input array.

## Java Programming – Construct an array from its pair-sum array

Java Programming - Construct array from its pair-sum array - Algorithm - A pair-sum array for array is array that contains sum of all pairs in ordered form.

## Java Programming – Count of n digit numbers whose sum of digits equals to given sum

Java Programming - Count of n digit numbers whose sum of digits equals to given sum - Dynamic Programming Given two integers ‘n’ and ‘sum’, find count

## Java Programming – Count ways to reach the n’th stair

Java Programming - Count ways to reach the n’th stair - Dynamic Programming There are n stairs, a person standing at the bottom wants to reach the top.

## Java Programming – Count number of binary strings without consecutive 1’s

Java Programming - Count number of binary strings without consecutive 1’s - Dynamic Programming Positive integer, count all possible distinct binary string

## Maximum sum rectangle in a 2D matrix

Java Programming - Maximum sum rectangle in a 2D matrix - Dynamic Programming - Given a 2D array, find the maximum sum subarray in it. For example

X