import java.util.*;
import java.math.*;
//rename the class name before submitting
public class LISNumberDivTwo {
public static void main(String[] args) {
LISNumberDivTwo obj = new LISNumberDivTwo();
System.out.println(
obj.calculate(
null
));
}
public int calculate(int[] seq) {
int cnt = 1;
for (int i = 1; i < seq.length; i++) {
if (seq[i] <= seq[i - 1])
cnt++;
}
return cnt;
}
}
No comments:
Post a Comment