+ 1
Security [Challenge Question](hard)
Though this code passed all tests,yet I feel it has lots of loopholes. Please check it and tell me where it has loopholes. Please suggest me alternative way to solve this question with minimum steps https://code.sololearn.com/cNElp5Lxj2mQ/?ref=app
11 Answers
+ 4
JaScript by the way thankyou for your precious time
+ 3
Of course, but faster and easier will be the idea as here in the solution with Python as follows:
t = input().replace("x", "")
print("ALARM" if "$T" in t or "Tquot; in t else "quiet")
+ 3
Md Saif ali did you find realization of the above mentioned Python code in Java?
If you want you can see that here:
https://code.sololearn.com/cIj81srYpWeb/?ref=app
+ 2
trim() is good thought, but not so really effective. If you remove additional all x from input it would be better. Then you can test the location of neighbors.
+ 2
JaScript
Can we create a String which store only g,t,m .
And we then we will find index of m then we will run loop which will check 't' [both at a+i ,a-i ...where "a" is index of m]won't appear before g?
+ 1
JaScript
Agreed but I wanna solve this question with java
+ 1
Md Saif ali I left that to you, the research, how can it be written in Java. A solution approach or idea is in my opinion the most important. The implementation is then fun.
+ 1
Md Saif ali you are welcome!
I enjoy it.
+ 1
Hi what is utf-8???
+ 1
FlowerNarges I didn't find the line or code segment about which you are talking about.