employer cover photo
employer logo
employer logo

Checkpoint Technologies

Is this your company?

Checkpoint Technologies interview question

1. Implement fibonnaci 2. Implement atoi (string to int)

Interview Answer

Anonymous

24 Jul 2017

1. fib(int n) { if (n == 0) return 0; if (n ==1) return 1; return fib(n-1) + fin(n-2); } 2. int atoi (String s) { int mult = 1; int result = 0; for (int i = 0; i < s.length; i++) { result = s.charAt(i) * mult; mult *= 10; } }