Fibonacci Series: The Fibonacci Sequence is the series of numbers where the next number is found by adding up the two numbers before it. F(0) = 0 F(1) = 1 F(n) = F(n-1) + F(n-2) Which of the following is the correct and the most efficient implementation for fibonacci numbers. int fib(int n) { int f[n+1]; int i; f[0] = 0; f[1] = 1; for (i = 2; i <= n; i++) { f[i] = f[i-1] + f[i-2]; } return f[n]; } int fib(int n) { int f[n+1]; int i; if( n <= 1) return n; f[0] = 0; f[1] = 1; for (i = 2; i < n; i++) { f[i] = f[i-1] + f[i-2]; } return f[n]; } int fib(int n) { if (n <= 1) return n; return fib(n-1) + fib(n-2); } int fib(int n) { int a = 0, b = 1, c, i; if( n == 0) return a; for (i = 2; i <= n; i++) { c = a + b; a = b; b = c; } return b; }
Developer Interview Questions
269,206 developer interview questions shared by candidates
What are migrations in Laravel What is a csrf token How to call a static method What happens when you make a request to Laravel
Questions asked were related to the CV. All questions were related to the domain you applied for,eg, Java.
What is your passion?
3 coding tests, problaby not allowed to reveal them.
Reverse a singly-linked list from first principles, using any programming language you like and without calling any standard library functions.
They asked me that can I work on SharePoint technology.
How to indent the JSON object?
The question was an extension to the second question which was given in coding round. Given a set of instructions and rules of a programming language, write a program to execute a set of instructions in that language.
the papers were hidden ________ the books a) in b) between c) among
Viewing 1371 - 1380 interview questions