Sunday 16 June 2013

Twitter Interview Questions

I came across some Twitter's personal interview questions asked for it's Software Engineering position during some discussion:


1) Find whether a string contains a contiguous palindromic substring in O(n) time. Can you solve the problem in O(1) time?

2) In an array, find the element which appears more than 50% of the time. Find element which appears more than 33% of the time in the array.

3) What is a distributed hashtable? How to make data persistent, prevent data loss, and still keep the access efficient?

4) What are the key differences between the data structures: Hashtable, Array, LinkedList, BST. For what kind of queries would a BST perform better than Hashtable?

5) How will you find the most frequently searched queries on Google in the last minute/last hour/last day from among a dynamic stream of queries?

Wednesday 12 June 2013

Must Watch Movies for Finance Enthusiasts

Yes, you read it right! This post is going to be about movies that will entertain you as well as enhance your knowledge about the finance industry in specific and about capitalism in general. I've watched a good number of finance movies/documentaries purely out of interest and I find following 10 movies to be the best picks for my finance movies portfolio:



Wallstreet (1987) 
This is one of the first hollywood drama to be made about Wallstreet. The main theme of this oscar-winning movie is of insider trading and illegal means to get an edge in the stock markets. Here is one of the epic dialogues by protagonist Gordon Gekko in the movie:

"Greed is right, greed works. Greed clarifies, cuts through, and captures the essence of the evolutionary spirit. Greed, in all of its forms; greed for life, for money, for love, knowledge has marked the upward surge of mankind. And greed, you mark my words, will not only save Teldar Paper, but that other malfunctioning corporation called the USA"

Enron (2005)
This documentary depicts the collapse of the 7th largest US firm, Enron, to bankruptcy in less than a year. My favorite character in the documentary is Jeff Skilling, the CEO of Enron. He is shown as a person who takes risk, purely for the thrill of it. 

Too big to fail (2011)
Based on the events leading to the financial crisis of 2008. The movie has characters with actual names and real-life events. The movie gets it's name from the fact that US banks have grown so huge that their failure will lead to collapse of the global economic system i.e. they are Too big to fail.

Inside Job (2010)
It provides a comprehensive analysis of the global financial crisis of 2008. It presents exclusive research and interviews of key politicians, journalists, academics and finance people. The movie concludes that finance industry has gone rogue and has corrupted politics, financial regulation and academia.

Overdose (2010)
This documentary traces the origins of the financial crisis and explores the similarities in policy lapse of financially unstable states like Greece, Iceland and even the USA.

Rogue Trader (1999)
The real story of trader Nick Leeson, who singlehandedly led to the bankruptcy of Barings Bank, one of Britian's oldest and important bank.

Margin Call (2011)
A fiction movie depicting key employees at a bank 24 hours before the financial crash.

Zeitgeist: Addendum (2008)
This documentary is an excellent critique of our "fractional reserve" debt-money system and the "Federal Reserve System" that controls it.

Freakonomics (2010)
Freakonomics is a collection of documentaries that explores human behavior in various real-world scenarios using the science of economics. An example which is presented in the movie: Can you improve students academically by awarding them cash prizes? This movie analyses and provides conclusions to such out-of-the-box questions. This movie is inspired from the famous book that goes by the same name, you can read the book if it interests you.

Capitalism: A love story (2009)
This film examines the impact of corporate dominance on the everyday lives of Americans. It's a sarcastic and humorous movie that addresses a serious issue.

Any additional suggestions for movies/documentaries/tv-shows/books are most welcome!