Avatar of gudii9
Flag for United States of America

asked on 

seriesUp challenge


I am working on below challenge


My psuedo code of the logical approach is
1. create array of given number
2. loop though each element to set each value with given pattern(not sure how to get other previous patterns?)
3. return the modified array

I wrote my code as below
public int[] seriesUp(int n) {
  int[] nums=new int[n];
  for(int i=0;i<nums.length;i++){
  return nums;

Open in new window

I am not passing all tests

How to improve my design, approach, code? please advise
JavaJava EEProgramming Languages-OtherProgrammingProgramming Theory

Avatar of undefined
Last Comment

8/22/2022 - Mon