Another question which belongs to the category of questions which are intentionally stated vaguely. Expectation is that you will ask for correct clarification or you will state your assumptions before ...
What should we return when needle is an empty string? This is a great question to ask during an interview. For the purpose of this problem, we will return 0 when needle is an empty string. This is ...