Analyzing Tech Challenges

Learning Goals

  • Understand how interviewers generally evaluate technical challenges
  • Identify how to focus your time for technical challenges
  • Learn and practice a method for breaking down technical challenges

Warm Up

Let’s assume that we will never be given a technical interview problem that we have seen before.

What can we do to feel prepared going into the interview? Think about what you would do before, during, and after an interview.

So what is a Live Coding Interview anyways?

  • One of many types of tech interviews: pairing interview, presentation interview, take home assessment, etc…
  • A 45-60 minute [sometimes language agnostic] challenge
  • A typical interview process might go something like:
    • HR Phone Screen → Technical Phone Screen → Technical Challenge → Take Home Challenge → Onsite Interview
  • Oftentimes the question is solvable in the amount of time given, but not always
  • Besides your standard Leetcode-style problem, alternatively, you could also be asked to build on top of an existing app feature, which we won’t go over today
  • Example: “Given an integer, give me the English human-readable string.” e.g. 45 returns “forty-five” 101 returns “one hundred one”

Not all companies use the same kind of technical interview, but technical challenges are still common. Different companies have different levels of difficulty and types of questions. Technical interviewing will likely be a career-long endeavor. Practice will pay off!

What do you think interviewers want to see from candidates during tech challenges?

Putting yourself in the interviewer’s shoes – what would you notice? What would you look for?

What are they looking for?

Reaction

Your interviewer will be looking for your initial reaction to the problem itself, e.g. do you comprehend the question? Ask clarifying questions - they are expecting you to! In fact, it can be a red flag to them if you don’t.

Thought Processes

How do you break down this problem? Have you considered edge cases? Interviewers are usually more interested in your ability to break down the problem than they are in your ability to solve it in the time given.

Passion

Are you energized by this kind of thing?

Communication

How are you conveying your thought processes and approach to your interviewer? The interviewer will discern very quickly how well you can code. The rest of the time is them evaluating your communication and thought process.

Decision-Making

There are trade-offs in solving a problem one way or another, so how and why did you choose your methodology? Is the solution performant? What trade-offs are you making? (Big O Notation)

Can you code?

Are you writing conventional code for the language? You do not need to solve 100% of every problem they give you.

Framework for Solving Technical Challenges

Let’s Try It!

Given two strings, can you rearrange the letters from one to make another?

“listen”, “silent” => true
“debit card”, “bad credit” => true
“fish”, “cows” => false

1. Understand

Ask questions to make sure you understand the challenge, and its edge cases. Read the problem! Read the problem again. After you have read the problem:

  • Take a minute to collect your thoughts
  • Ask clarifying questions!
  • Think about edge-cases
  • Identify some simple test cases

2. Match

There are a handful of types of technical challenges. If you can identify common patterns among challenges, you can recall how you solved similar problems and quickly evaluate whether or not that same approach will be effective. Some problems fall into a single category, other problems will involve a mix of different categories. Identify the type of problem and any algorithms that might be helpful. Take a moment to consider if you’ve solved this problem, a part of this problem, or something similar in the past.

Does the problem require some kind of algorithm that you’re familiar with? For example, maybe you need to sort. Maybe you’ll need to use recursion. Maybe you’ll need some math.

What algorithms, methods, syntax, tools, etc. might help you solve this problem?

See examples at the bottom of this lesson for common types of problems, data structures, and algorithms.

3. Plan

Write down the steps needed to solve the problem and pseudo-code a solution. If interview is 45 minutes, ~10 minutes can be spent pseudocoding! Once you understand the problem, spend time on the mid-level design.

  • Start by writing out simple steps in a “code-like” structure. This helps prove out your design before you start coding, and allows the interviewer to intervene if your design is flawed.
  • Try to keep your pseudocode in spoken language as much as possible. Avoid “fake code” which is harder to follow later.
  • Communicate out loud what you’re thinking and why you’re thinking it.
  • You don’t need to come up with the most flashy solution, especially in the planning phase.
  • Pseudocoding is about strategy, not syntax

Take 5 minutes to match this problem to any of your past knowledge and write out some pseudocode. It’s ok if this is your first time seeing this type of problem, give it a shot!

4. Implement

Code out your solution. If the only ideas that are coming to mind are the “brute force” solution, that’s okay! Plan and execute, and if you come up with a better solution, you can revisit the plan. Get it working first.

5. Reflect

Talk through an example out loud to validate that your code will do what you think it should.

6. Evaluate

Evaluate any ways you might optimize your solution further. For example, consider the time complexity of your solution (Big O) and how it could be improved.

Tips for Effective Practice

  • Use a plain text editor (sometimes)
  • Work toward exposure to major concepts, then be organized and study one type of problem at a time
  • Practice regularly - 30 min/day!
  • Practice talking out loud as your practice
  • Vary the difficulty level of your practice - don’t do all easy or all hard!
  • Keep coming back to problems you’ve solved before
  • Record yourself. No, SERIOUSLY.

Practice

Instructions

You will be given a technical challenge and asked to analyze it in your breakout room.

  1. Understand: Brainstorm edge cases & alternative inputs
  2. Match: Identify the type of problem
  3. Break the problem down into small steps
  4. Plan: Write out some pseudo code

Common Patterns, Data Structures, and Algorithms

Problem Types

Challenge Types

  • Objects (Dictionaries/Hashes): Objects can be used to solve problems due to their ability to quickly look-up key-values.
  • Arrays: Array traversal is a common pattern. You may iterate over each value one-by-one or use a two pointer technique to approach from both ends.
  • Strings: These may include finding palindromes, reversal, and other patterns. String problems often incorporate using objects/arrays/etc.
  • Dynamic Programming: DP is the process of breaking down a large problem into smaller subproblems and (usually) recursively finding a solution.
  • Matrix (2D Arrays): Matrices can be used to represent a picture (arrays of pixel data) or any other 2D setup (like a geographical map).
  • Heaps: Heaps are used for priority queues and other queue-like functionality in programming. They are fast at finding the min/max value of some set of values.

Data Structures

Some challenges will explicitly state which data structures to use while others will be purposefully vague. Interviewers will want to hear your thought process about:

  • Which data structure you will choose
  • How you evaluate the pros/cons of your choice
  • How you implement your code based on that choice

Common Data Structures

  • Array
  • Hash/Object
  • Linked List
  • Stacks
  • Queues
  • Binary Tree
  • Graphs

Learn these three things about each data structure:

  • What is this data structure really good for?
  • What are drawbacks to this data structure?
  • When/Where is the data structure most commonly used?

If you can answer these questions about each data structure, it will help you to solve the majority of the code challenges you will encounter during an interview.

Additional Resources

Lesson Search Results

Showing top 10 results