SBSTR1 - Substring Check (Bug Funny)
Given two binary strings, A (of length 10) and B (of length 5), output 1 if B is a substring of A and 0 otherwise.
Please note, that the solution may only be submitted in the following languages: Brainf**k, Whitespace and Intercal.
24 lines consisting of pairs of binary strings A and B separated by a single space.
The logical value of: 'B is a substring of A'.
First two lines of input:
First two lines of output:
what is this! i wote my solution using C++,but submitted by BrainF**k,nevertheless i got wrong answer,not compilation error! i got amazed :)
i coded in java it says time exceeded so im unable to check the logic :(
why not in other languages
Is this even possible in intercal? It appears only spelled-out numerals are accepted as input.
Last edit: 2016-07-04 12:58:54
Guneet, I think you can implement the function yourself. Time complexity is 'm+n' where m,n are lengths of string A and B respectively,
So I am assuming esoteric languages aren't really famous yet.
coded in java and felt like hell