In my career spanning more than a decade, I have used C language in only two projects. All these years, I had either coded in C++, Java or C#.
However, during interviews, I had always coded my solutions in C. When an interviewer asks you to implement a Stack having one extra operation, getMinimum that returns minimum element in current stack, you are expected to give your own implementation of stack from scratch and not use Stack class in Java library.
Searching & sorting algorithms form the back bone of coding acumen of developers. This book comprehensively covers
In-depth tutorial & analysis of all major algorithms and techniques used to search and sort across data structures.
All major variations of each algorithm (e.g. Ternary, Jump, Exponential, Interpolation are variations of Binary search).
110 real coding interview questions
I wanted to compute 80th term of the Fibonacci series. I wrote the rampant recursive function,
int fib(int n){
return (1==n || 2==n) ? 1 : fib(n-1) + fib(n-2);
}
and waited for the result. I wait… and wait… and wait…
With an 8GB RAM and an Intel i5 CPU, why is it taking so long? I terminated the process and tried computing the 40th term. It took about a second. I put a check and was shocked to find th