+ 1
How Far? Challenge, I don't think im understand why checks 3 and 4 are not correct i did some debuging with different strings
8 Antworten
+ 4
After testing couple possibilities, finally I found it may be that the path may from left to right or right to left.
Reverse finding path, got test 3,4 passed. Should mention in task, may left it user think.
+ 3
Jayakrishna🇮🇳
You are walking from your house to a pond that is down your street.
How many blocks over will you have to walk until you get to the pond?
Task:
Evaluate how many blocks you will have to walk if you are given a representation of your street where H represents your house, P represents the pond, and every B represents a block in between the two.
Input Format:
A string of letters representing your house, the pond, and blocks on your street.
Output Format:
An integer value that represents the number of blocks between your house and the pond.
Sample Input:
BBHBBBBPBBB
Sample Output:
4
Explanation:
There are 4 blocks between your house and the pond on your street.
+ 2
Ok thank you kinda destroys my code idea lol
+ 1
All strings i did worked fine so what am i missing
+ 1
Its the How Far? Challenge its in the medium level
+ 1
Make use of IndexOf() method for simplicity instead of loop.. Hint.
You're welcome..
0
What is the challenge there , add the description pls..
0
In requirement they should mention , what if pond comes first, only it mentions if house comes first,i tried lot debugging, they reverse came in my mind & it worked!! I believe tester put wrong test case!he didnt got requirement properly!