Coding Interview: Coding Challenge

There is no hack for finding a position, please be honest in every interaction.

The coding challenge is to tell the interviewers how you will work with them as a co-worker. It is not simply about your programming skills. So remember to think of more about your interaction than, did I solve the question they asked…

Here is where I can give you the template I have found works everytime.

  1. Listen well to the challenge they are giving to you.
    • Example: Given the floor plan you see below, How could you write a program for a character to find a path from 1 stair case, to the other?
      Free Dungeon Map
  2. Ask Questions. You want to have a clear understanding of what they are asking of you, to make sure you can code to it. Also, please notice that I picked a problem for this example that might be WAY too big for a 1 hour interview. So, think about, and ask about your assumptions.
    • Can I assume there is any code written so far?
    • Will we want to track the path our character took?
    • Are we looking for the most efficient path?
    • When I write my initial function, should I assume I am given a starting point?
    • Can I assume that 1 movement takes me 1 square?
    • Big Caveat: Some answers might be “We don’t know”. In this case, move forward with an assumption, but communicate what your assumptions are.
  3. Add Test Cases
    • It is very important that we are building towards an expected outcome. Think about and communicate/jot down your test cases.
    • This can often help you see questions you have not yet asked that would help to know.
  4. Pseudo-Code
    • Outline your coding ideas in pseudo-code so that you can talk about and think about how you would like your program to run from beginning to end.
    • This also helps you clarify for yourself, and communicate any assumptions you are working under.
  5. Coding
    • Start coding
    • Try not to think about every challenge at once. Solve each problem 1 at a time.
    • You can always go back and make it more efficient.
    • Don’t be afraid to ask questions and clarify. Use your interviewer as a team mate.
    • If you know there is a specific tool you would like to use, but cannot remember the specific syntax, communicate this, and ask if it ok for you to search for the correct syntax.
    • If you need to search for something, or look at another webpage, communicate what you are doing so no one thinks you are cheating.
    • Do not assume that your challenge must be solved in a single function. It is ok to create and use multiple functions to organize your code (unless explicitly asked otherwise)
  6. Testing
    • If time allows, take your task cases and shape them into code, so you can see that your tests pass.
    • if they do not pass, that is OK. Calmly communicate that they did not pass, and step into your debugging process. How do you look at your own code to see where it went wrong? 1-line-at-a-time!

In this coding interview, The communication, thinking out loud (within reason) and directing your efforts forward are really what matter. Solving the problem seems to always be the biggest thing on everyones mind, but often, these coding challenges are not designed to be a 1-answer win.


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *