What do I find programming interview problems to practice on?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: What do I find programming interview problems to practice on?

  1. #1
    Join Date
    Nov 2008
    Posts
    7

    What do I find programming interview problems to practice on?

    Dear all,

    I am applying for a software engineer job position (C++).

    I knew I am going to be grilled with two types of problems at this stage:

    (1) C++ Talk or Paper test questions.
    (2) C++ programming/coding test questions.

    The first one is more about concept, and everything is on paper. There will be no real programming involved.

    The second one is going to be more horrible. Because I will have to do the real programming, with or without people monitoring me, and it's within 1-2 hours time limit, and my code has to compile and has to work. Otherwise the interviewer will not even want to look at my code. This is something like working out something under pressure. It's hard because programming involves a lot of debugging and if under pressure, I can be easily stuck in the debugging... On top of meeting basic requirements, they will then look at speed and the smartness of coding... etc.

    I decided to use Visual C++. The questions involved in this second type will be some computer problem solving involving some algorithm and some data-structure. I guess it will not be a huge implementation of Black-Red Tree, etc., because I guess that's not doable with 1-2 hours? Of course it will not be too easy something like sorting too...

    So my question is: how to prepare and practice for the second type of questions? And are there any good practice problems that can be worked out in 1-2 hours?

    Thank you!

  2. #2
    Join Date
    Mar 2001
    Posts
    2,366

    Re: What do I find programming interview problems to practice on?

    I suggest that you look at the topical outline for C++ tests at websites such as brainbench.com to see what topics are important in C++. Then get some good C++ references, possibly at your local library, and make sure you know those topics.

    Here are a few good texts on Algorithms with C++:
    Algorithms and Data Structures in C++ Leen Ammeraal which can be found at:
    http://www.amazon.com/Algorithms-Dat...rdr_bb_product
    Which also covers all of the algorithms you will probably need to know on your test.

    Algorithms in C++ by Robert Sedgewick
    http://www.amazon.com/Algorithms-Par.../dp/0201350882
    http://www.amazon.com/Bundle-Algorit...7390587&sr=1-2

    I suggest looking at an O'Reilly book: Mastering algorithms with C. I realize this is not C++ but it has some pretty great information on the all the concepts you mentioned, as well as explanations and diagriams.

    On top of that if possible you use the STL, alot of important Algorithms are already implemented for you such as list, queue, stack, and so fourth. So if you are comfortable with STL that will be really great because you can solve problems without having to reduntantly code algorithms with existing generic implementations.

    Try to conceptually solve the problem in the abstract, and then write code.
    Last edited by ahoodin; November 22nd, 2008 at 03:58 PM. Reason: add a few descriptive words
    ahoodin
    To keep the plot moving, that's why.

  3. #3
    Join Date
    Nov 2008
    Posts
    7

    Re: What do I find programming interview problems to practice on?

    Thanks a lot! Yeah, I would like to use STL because it is really convenient in terms of using these components. Then lots of data structure books talking about link-lists are not useful because I can directly use STL. However, are there any good test problems that I can practice on? I am not sure what type problems are meaningful test problems with difficulty level such as 1 problem in 1 hour.

    An equivalent question of asking for "sample test problems" can be: where can I find good books, good codes, good websites, good code snippet repository that have a lot of good meaningful examples of how people use those algorithms and STL?
    Last edited by mizhael; November 22nd, 2008 at 08:12 PM.

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

    Re: What do I find programming interview problems to practice on?

    Well, www.cplusplus.com has examples on most of their reference pages....

  5. #5
    Join Date
    Nov 2008
    Posts
    7

    Re: What do I find programming interview problems to practice on?

    In fact, I realize the test problems can also be not to play around with the data-structure and/or STL stuff. They can be more like a brain-teaser, and ask you to work out some program to do something with a stringent space or time requirement.

  6. #6
    Join Date
    Nov 2008
    Posts
    7

    Re: What do I find programming interview problems to practice on?

    Quote Originally Posted by Lindley View Post
    Well, www.cplusplus.com has examples on most of their reference pages....
    but those are not algorithm or problem solving examples, they are language learning examples...

  7. #7
    Join Date
    Mar 2001
    Posts
    2,366

    Re: What do I find programming interview problems to practice on?

    Quote Originally Posted by mizhael View Post
    They can be more like a brain-teaser, and ask you to work out some program to do something with a stringent space or time requirement.
    This is true. In some cases the problems are good, in others the problems and the questions are almost pointless. It can be very hard to study for these kinds of questions unless you get into a regular habit of it. They are meant to show that you have the ability to solve problems small and large.
    I recently enjoyed browsing Programming Pearls:
    http://www.amazon.com/Programming-Pe...7415645&sr=8-5
    It actually has a section on Algorithms, and covers alot problem solving skills for programming.

    Facebook and other Social networks are starting to take swipes at getting into recruiting (monsterboard and careerbuilder watch out!).
    http://www.facebook.com/jobs_puzzles/

    LinkedIn is already making finding a job a social excercise.
    http://www.linkedin.com/

    I was recently asked this old problem at an interview for a C++ position, that I remember getting in a CS class one day:

    Find a way to make the following C program fragment print 42 dashes, by changing only one character. Then find two more!
    Code:
    int i, n = 42;
    for (i = 0; i < n; i--)
      printf("-");
    True it is a pretty simple problem, but it is an excercise in efficiency, especially when you in an interview.

    Don't forget to read up on the company you are interviewing with, and try to know something about the product.
    It will impress your interviewers if you did your Homework, and show that you are taking interest.
    Last edited by ahoodin; November 22nd, 2008 at 11:03 PM.
    ahoodin
    To keep the plot moving, that's why.

  8. #8
    Join Date
    Nov 2008
    Posts
    7

    Re: What do I find programming interview problems to practice on?

    Okay! You just have to change "i < n" into "-i<n".

    But these type of questions won't be real-time coding test. Remember the coding test will be 1 hour per problem. And the code has to be working, otherwise the interviewer won't even look at it.

    So I am looking for that type of real coding questions to practice on...

  9. #9
    Join Date
    Mar 2001
    Posts
    2,366

    Re: What do I find programming interview problems to practice on?

    there are 3 easy 1 character changes that can be made to the original for loop to make it work. What I mean is from the original loop, make a character change that will make it work. Now go back to the original loop code and make another single character change.

    Ok Now for those problems you wanted:

    http://www.softwareinterview.com/

    Exceptional C++ / 47 Engineering Puzzles, Programming Puzzles and solutions online format:

    http://books.google.com/books?hl=en&...result#PPP1,M1
    ahoodin
    To keep the plot moving, that's why.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center