Category Archives: Programming Interview

Programming Interview Questions 8: Transform Word

Given a source word, target word and an English dictionary, transform the source word to target by changing/adding/removing 1 character at a time, while all intermediate words being valid English words. Return the transformation chain which has the smallest number … Continue reading

Posted in Programming Interview | 8 Comments

Programming Interview Questions 7: Binary Search Tree Check

This is a very common interview question. Given a binary tree, check whether it’s a binary search tree or not. Simple as that..

Posted in Programming Interview | 4 Comments

Programming Interview Questions 6: Combine Two Strings

We are given 3 strings: str1, str2, and str3. Str3 is said to be a shuffle of str1 and str2 if it can be formed by interleaving the characters of str1 and str2 in a way that maintains the left … Continue reading

Posted in Programming Interview | 12 Comments

Programming Interview Questions 5: Linked List Remove Nodes

This is a very fundamental question and it’s tricky to implement without any bugs. Given a linkedlist of integers and an integer value, delete every node of the linkedlist containing that value.

Posted in Programming Interview | 6 Comments

Programming Interview Questions 4: Find Missing Element

This question can be solved efficiently with a very clever trick. There is an array of non-negative integers. A second array is formed by shuffling the elements of the first array and deleting a random element. Given these two arrays, … Continue reading

Posted in Programming Interview | 12 Comments

Programming Interview Questions 3: Largest Continuous Sum

This is one of the most common interview practice questions. Given an array of integers (positive and negative) find the largest continuous sum.

Posted in Programming Interview | 7 Comments

Programming Interview Questions 2: Matrix Region Sum

This is a very elegant question which seems easy at first but requires some hard thinking to solve it efficiently: Given a matrix of integers and coordinates of a rectangular region within the matrix, find the sum of numbers falling … Continue reading

Posted in Programming Interview | 8 Comments

Programming Interview Questions 1: Array Pair Sum

Once again it’s the college recruiting season of the year and tech companies started the interview process for full time and internship positions. I had many interviews last year these days for a summer internship. Eventually I was an intern … Continue reading

Posted in Programming Interview | 10 Comments

My Favorite Interview Question

I am working at Microsoft Bing as an intern this summer. To get an internship I had lots of interviews with various tech companies this year, and this was my favorite question: In an integer array with N elements (N is … Continue reading

Posted in Programming Interview | 9 Comments