Directory Freebies VS CheatSheet Forum

RSS

Email

Translate

Home About Archive Privacy Contact Advertise Write for Dev102
Posted by Shahar A on Jun 2nd, 2008 | Filed under C# | 41 Comments

The sixth of the series of programming job interview challenge is out. Other then commenting the solution, I remind you that you can post the solution on your blog and get a link next week!

Here is the solution to the previous challenge:
Two-way merge sort (External Sorting) : The idea is breaking the big file into subfiles, sorting them and than merging them back together. In the first pass read one page at a time, the records in the page are sorted (quicksort for example) and the page is written back to disk. in subsequent passes, each pair of sorted output from the previous pass are read and merged to produce sorted subfile twice as long:

1. Read each page, Sort it, Write it back
2. while more than one sorted subfile:
while subfiles from previous pass left to merge:
- Choose next two subfiles from previous pass
- Read each subfile into a memory page (one page at a time)
- Merge the subfiles (remember each of them is already sorted), write output to a memory page
- Write output page to disk when needed.


Continue Reading...
Posted by Shahar A on May 26th, 2008 | Filed under .Net | 25 Comments

This is the fifth challenge in the series of programming job interview challenge. As usual, we’ll provide an answer to the previous challenge and give you a new challenge to keep you busy this week. Other then commenting the solution, I remind you that you can post the solution on your blog and let us know about it [...]


Continue Reading...
Posted by Shahar Y on May 19th, 2008 | Filed under .Net | 219 Comments

This is the fourth post in the series of programming job interview challenge. Today, I will provide the answer to job interview challenge #3, talk about readers answers (all of the comments are now approved) and give you a new challenge. So, lets get into business:

The correct answer to challenge #3:

  1. Start with the lower left cell (first column, last row).
  2. If the value matches, you’re done.
  3. If the searched value is bigger than the current cell, go right. That way an entire column is eliminated (all of the values left in that column are lower than the searched value). If you can’t go right - the searched value is not in the matrix.
  4. If the searched value is smaller than the current cell, go up. That way an entire row is eliminated (all of the values left in that row are bigger than the searched value). If you can’t go up - the searched value is not in the matrix.
  5. Go back to 2.


Continue Reading...

Posted by Shahar Y on May 12th, 2008 | Filed under .Net | 54 Comments

This post is third in the series of programming job interview challenge, if you are not yet familiar with these series please take your time and read:

  1. A Programming Job Interview Challenge
  2. A Programming Job Interview Challenge #2

Well, last weeks challenge was very successful, all of the comments which contain answers to the question are now approved and can be viewed in challenge #2 post.


Continue Reading...
Posted by Shahar Y on May 5th, 2008 | Filed under .Net, C# | 39 Comments

Job Interview ChallengeLast week I posted A Programming Job Interview Challenge which was very successful, both in the amount of page views and, in the amount of comments and mails we received. This fact made us (the Dev102 team) decide to add a weekly programming job interview challenge column to www.Dev102.com.


Continue Reading...
Write Article for Dev102

Write for Dev102!

We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution

Learn More