The twelfth post of the series of programming job interview challenge is out, 28 readers provided answers to job interview challenge #11. I have to admit that I probably failed explaining what I was looking for in challenge #11, because I asked you to provide the best algorithm in both manners: performance and memory. What I really meant is that performance is most important but don’t neglect the memory issue. Due to my little “embarrassing failure”, there are two groups of correct answers – the performance oriented and the memory oriented.

The correct answer which I was looking for (best at performance) as Alex, the first one to provide a detailed solution (its two times in a row), wrote:

Continue Reading...

Recently, I ran into an interesting job interview question in C++ which I want to share. Lets take a look at the following code:

// Option A. 

char str1[] = "example";  

str1[1] = 'a';  

// Option B.  

char* str2 = "example";  

str2[1] = 'a';

What would happen if we compile and run this code ?

Continue Reading...

It is common knowledge that there is no such thing as software without bugs. There are several bugs out there that are hiding and therefore are not handled at all. We surely don’t want to release a software that will crash ungracefully due to such a case. Fortunately, the .Net framework makes it possible to […]

Continue Reading...