Doubt in my code

Hello, what is the problem in my code ?

Hello @yashsharma4304 commented the mistake:

Why we are not checking for digit = 0 condition ?

please reply !!! :pray: :pray:

@yashsharma4304 it is not needed.
because you are limiting one result if you are applying that case.
lets think in the another way why do you think we should add that condition?

string table[] = { " ", “.+@$”, “abc”, “def”, “ghi”, “jkl” , “mno”, “pqrs” , “tuv”, “wxyz” };

We are given with this list of strings and at the 0th index a null string is present so I want to skip that therefore I was using that condition.

@yashsharma4304 you have to use that why are you skipping it?

But why we have skipped in this case

@yashsharma4304 you can check this code will not even produce the correct result.

Ok so if I don’t use those conditions then it would be a better choice because there is no such need to skip those elements as they are already null.

Right ???

@yashsharma4304 Yes right

1 Like