Challenge Information

Title : Return string with given prefix
Difficulty : Hard
Solutions : 6
Maximum Score : 300
Completed by You: No
Description :

Implement an autocomplete system. There is a query string 's' and a set of all possible query strings given. You have to return all strings in the set that have 's' as a prefix.

Write a function solve that have the following parameter(s):
1.) arr = an array of string
2.) s= a string

Example
Input:
[dog, deer, deal]
The query string is de
Output:
The function will return,
[deer, deal]

Explanation
The query string is "de" so it will return all strings from an array that prefix is "de" that is, (deer, deal).

Constraints

Judocode