We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- No Prefix Set
- Discussions
No Prefix Set
No Prefix Set
Sort by
recency
|
191 Discussions
|
Please Login in order to post a comment
This is a terribly written question. In any real interview, you would be expected to ask clarifying questions, such as: 1. Do you want me to print the first string that has a prefix among the earlier strings in the array, or the first string that is a prefix of another string in the array? 2. If a string encountered later in the array is the prefix of a string encountered earlier in the array, which should be printed? 3. What should you print if there is only one element in the array? This question, as posed, relies on you exercising an essential skill (seeking clarification for unclear requirements) that is impossible to exercise in the format given.
why does test 1 have the followind outcome
BAD SET d
d isn't prefixed... and the string on the outcome should be the one with the prefix in it... i don't know what am i missing here
why this question cannot be done using sets.
test
Any idea how to pass the performance requirements using R? I ported my R solution to python and it passed, but it seems like since R is an option, there should be a solution in R that can pass it. Here's what I have so far: