Skip to content

Files

Latest commit

 

History

History

Problem_08

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Exercise 1:

Given an array of integers, write a program Ones.java to find the maximum number of consecutive 1's present in the array.

e.g,

{1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1} --> 4

{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1} --> 1

Exercise 2:

Write a Java program Zeros.java to move all 0's to the end of an array. Maintain the relative order of the other (non-zero) array elements.