employer cover photo
employer logo
employer logo

Jack Henry & Associates

Engaged employer

Jack Henry & Associates interview question

Part 1 : Write a method to return array of Fibonacci sequence

Interview Answer

Anonymous

5 Sept 2018

public class Fibo { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub fiboArray(4); } public static int[] fiboArray(int a) { int[] fiboArray = new int[a]; int i; if(a==1) { fiboArray[0] = 0; for(int j=0;j