Wednesday, April 27, 2016

Recursion Interview Questions - Finance Industry

Depending on the role in question, a few common questions that I have faced are listed below, and I've added some that seem inspired from them. I have used Java for coding, but you should be able get the gist of it.

Fibonacci:
public static int fibonacci(int n)
{
             if (n<=1)
               return 1;
             else return fibonacci(n-1) + fibonacci(n-2)
}

OR

public static int fibonacci(int n)
{
             if (n=0)   return 0;
             if (n=1)   return 1;
             else return fibonacci(n-1) + fibonacci(n-2)
}

Factorial:
public static int factorial(int n)
{
             if (n=1)  return 1;
             else return n X factorial (n-1);
}

Multiplication:
public static int multiply(int m, int n)
{
             if (n =1) return m;
             else return m X multiply(m, n-1)

}

Division:
public static int divide (int dividend, int divisor)
{
             if ((dividend-divisor)<0)           return 0;
             else return 1 + divide (dividend-divisor, divisor)
}

Sum:
public static int sum(int n)
{
             if (n==0)    return 0;
             else return  n + sum(n-1)
}

Power:
public static int power(int base, int exponent)
{
             if (exponent==0)   return 1;
             else return base X power(base, exponent-1)    
}


Thursday, April 21, 2016

The Financial Jungle

Pretty much everyone has heard about the financial market being a bull or bear market. However, have you heard of the other animals in finance?

Ever heard of a stag market? A stag market is when one  is trying to make quick profit by buying and selling off shares quickly.

Hello!

Hello and warm welcome to everyone!

This being my first time blogging, I'll leave you with a cartoon for thought!
https://honjii.wordpress.com/category/corporate-bullys/