Module quiz: Introduction to the coding interview

Module quiz: Introduction to the coding interview

  1. What should be done when presented with a technical problem where the solution is not immediately obvious?

    • Ask the interviewer how they would solve the problem.

    • Move the conversation along and try not to draw attention.

    • Ask questions.

  2. During a technical interview, is it better to rely on the work of others, or code everything yourself?

    • Use code written by others.

    • Use the data structures, but don’t use any other external implementation.

    • Write as much code as you can to show off your skills.

  3. Given an array that represents sock colors: Sock_colors = [3,3,2,1,1,3,5,1,4,2], how many pairs of the same color socks exist?

    • 3

    • 2

    • 4

  4. It is best to remain silent when writing code during a technical interview.

    • True

    • False

  5. Should I ask questions in an interview?

    • Yes. Asking questions can run down the interview clock and so avoid awkward questions.

    • Yes, but only when the conversation looks like it is going to help the interviewer along.

    • Yes. Ask questions for clarity or during an appropriate time.

  6. What is the STAR method?

    • A structured approach to answering questions.

    • A stellar answer to a good question.

    • A coding practice with 4 key components.

  7. What is meant by transfer rate in relation to a CPU?

    • The rate at which memory is transferred into cache.

    • The rate at which instructions are processed.

    • The rate at which a processor can convert input from a terminal.

  8. When engaged with a coding interview what sorts of tests should you aim to include?

    • Unit tests

    • Integration tests

    • Functional tests

  9. Which memory location is closest to the CPU?

    • Cache

    • Secondary memory

    • Main memory

  10. When designing a solution it is best to:

    • Tackle every problem as it arises.

    • Doing a quick sketch then implementing everything on the page.

    • Planning an outline, engaging the main obstacles, looking at the potential solutions and constantly reviewing.