Do you even understand the problem?

RMAG news

Software engineering requires a wide range of problem solving skills. To build those skills, sometimes we need to work all the way through a challenging problem.

Other times, we need an easier approach. Consistent practice on micro skills can be an easy and fast way to improve your capabilities.

Do you like the idea of practicing your skills in small, simple doses? Do you like the idea of Leetcode, but sometimes find a whole Leetcode problem too much to bite off?

Instead of solving an entire Leetcode problem, why not practice just one tiny part of it?

Here’s an easy skill to start with: restating the problem!

Choose a random problem on Leetcode, and quickly work through the questions below. Answer these questions on paper, whiteboard, text file, talking to your rubber duck, or whatever, but not in code yet

Restate The Problem and Check Your Understanding

Overview

Explain the problem to be solved.
What are the inputs to this function?
What are the outputs?

Examples and Test Cases

What do the examples illustrate about the problem?
What can you learn from the test cases?
What other examples and test cases can you think of?

Constraints

How do the given constraints help your understanding of the problem?

Understanding

Which details did you immediately understand?
Which details were a bit confusing at first?
How is this problem similar to, or different from, other problems you’ve solved?
Which parts of this problem made you feel confident, or uncertain?

That’s it! Don’t worry yet about how to solve the problem (unless you want to). You can learn quite a bit in just a few minutes by working through these questions.

If you found this to be a helpful exercise, I encourage you to return to it regularly, and to try it with a peer or mentor!

Leave a Reply

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