Cracking the coding interview questions

The book - cracking the coding interview has list of questions. The list of questions and solutions is not comprehensive, but I guess that is the point. Coding interviews are about judging your approach to problems rather than specific solutions. I found that some of the problems were quite simple compared to the difficulty level currently in force at various companies. In particular would like to see more dynamic programming problems, but I think the author covers all the main questions, which sharpens our mind to focus on the problem solving, and is a very good starting point, which covers almost 80-90% problem solving exercises. [Read More]

Searching Questions

Here are some questions on searching Search types Linear Search on Array Binary search on Array - Recursive and iterative Special case of Ranged array By ranged array, I mean that array has some specific size, say N, and numbers in that array can occur in a range of 0 to N-1. I don’t know if some other special name exists for such arrays. But lets go ahead with this name. [Read More]

Some useful resources

Algorithms

Bit manipulation

Unix Threading tutorial

https://programming4interviews.wordpress.com/category/mathematics/

Strings index

C style string Reverse a c-style string Replace all spaces in a string with “%20″ in c-style string atoi() in Java itoa() in Java Implementing strcpy Implementing strcat Implementing strcmp Implementing a strstr() / indexOf function CPP strings C Strings Making a String class in cpp String Class in cpp(Standard cpp strings) Internal functions in C Miscellaneous cases with printf String search algorithms Karp-Rabin algorithm Boyer Moore Algorithm String Searching Algorithm - Knuth Morris Pratt or KMP Algorithm [Read More]

Find the minimum and maximum in the array

Here are few question we find on finding min and max in the array, but array type changes. Unsorted 1D array Find the maximum (OR minimum) in an array Find the maximum AND minimum in an array with min number of comparisons Find the max and second maximum in an array (likewise for minimum) Find the max and nth max in an array Rotated Sorted array Find the minimum element in the rotated sorted array. [Read More]