Hey there.
Welcome back.
Let's now take a look at a very famous coding interview question called combinations.
So the question reads given two integers n and k, return all possible combinations of k numbers chosen
from the range one comma n.
So let's say n is equal to four and k is equal to two.
So in the example that's given to us, we have to form all possible combinations of two numbers from
the range one comma n which is 1234.
So notice over here we have one comma two one comma three one comma four, two comma three, two comma
four and three comma four.
So these are all the possible combinations that can be made which consist of two numbers from the range
one comma four.
And then the question also says that you may return the answer in any order, which means that one comma
two will be treated as the same as two comma one.
So we have understood the question.
And again, remember in a coding interview, it's important that you ask the interviewer any clarifying
questions which you may want to ask.
So for this question a possible clarifying question could be will k be less than n at any point?
Because in that case that would be a problem.
What if n is equal to four but k is equal to ten?
Let's say to this question, the interviewer replies no, k will always be between one and n, both
inclusive.
All right.
So we have understood the question, and we have asked any clarifying questions that we may want to
ask.
Now in the next video, let's think through the approach that we can take to solve this question.