Cracking the Coding Interview

Cracking the Coding Interview

Today is the day, I applied to a bunch of companies to move forward from my current job, a recruiter from one of these companies replied suggesting to apply for a Software Developer position in certain big company, and with the fear that I have approaching corporations I hesitated and continued the search with other offers. However, the curiosity forced me to investigate the company a bit more and I was able to find some developers that were working there through Reddit and GitHub — unfortunately my account was blacklisted during that time so I had to rely on my Google Fu to find their e-mail addresses.

[…] The researchers suggest that as social network sites become more heavily used, then people will find it increasingly difficult to maintain a veil of anonymity. In “De-anonymizing social networks,” the researchers take an anonymous graph of the social relationships established through Twitter and find that they can actually identify many Twitter accounts based on an entirely different data source — in this case, Flickr.

The issue is of more than academic interest, as social networks now routinely release such anonymous social graphs to advertisers and third-party apps, and government and academic researchers ask for such data to conduct research. But the data isn’t nearly as “anonymous” as those releasing it appear to think it is, and it can easily be cross-referenced to other data sets to expose user identities.

Identifying People using Anonymous Social Networking Data

At the end I was able to contact 4-5 developers that are or were working at the same company. They were very nice, respectful, and answered all my questions giving me the motivation to continue with the interview process. However, I was conscious if my current skills, specially in data structures and algorithms, were not good enough. Technical interviews are always a PITA but compared with interviews for non-technical jobs like Management, Design, Customer Support I will prefer Math-like tests 1000x over the others because with Math there is only binary outputs, you either resolve the problem correctly or not.

Unfortunately, engineers always tend to expect too much from others. I was certain that the job offer was not going to be extended to me, but I wanted to take this as an opportunity to refresh my knowledge about algorithms. If this company was not going to hire me then I needed to be prepared for interviews with others.

Many people suggest to read “Cracking the Coding Interview — by Gayle Laakmann McDowell”; the book gives you the interview preparation you need to get the top software developer jobs. This is a deeply technical book and focuses on the software engineering skills to ace your interview.

Here I will attempt to solve some of the questions following a step-by-step thought process. Consider that I haven’t used any of these algorithms in my previous jobs, so if you are a beginner you will probably associate with my point of view. Notice that I will try to solve these exercises using pseudo-code to generalize the solutions, this way we can focus on the algorithms and not the programming language.

Do you have a project idea? Let's make it together!