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)

# Category - JAVA

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)

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.

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

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 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 - Dynamic Programming Given two integers ‘n’ and ‘sum’, find count

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 - Dynamic Programming Positive integer, count all possible distinct binary string

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