Tip 1 : After completing a question, make sure to revisit after successful submission to understand where you went wrong early on.
Tip 2 : Keep the trick or the path which let you to solve a problem. Most of the questions you'll find, does have some kind of similar pattern
Tip 1 : Your Resume should clearly define who you are and what you have done. Be very honest in your document.
Tip 2 : It should not exceed 1 page if you have less than 2.6 yrs of exp. Mention only the important projects and remove the unnecessary stuff.






You may assume that the given array/list is non-empty and the majority element always exists in the array.









Input:
["AutocompleteSystem","input","input","input"]
[[["i want to join faang","icecream","i love coding ninjas"],[4,3,1],["i"],["s"],["#"]]
Output:
[null,["i want to join faang","icecream","i love coding ninjas"],[],[]]
Explanation:
* AutocompleteSystem obj = new AutocompleteSystem(["i want to join faang","icecream","i love coding ninjas"],[4,3,1]);
* obj.input(“i”); // return ["i want to join faang","icecream","i love coding ninjas"]. There are three sentences that have prefix "I".
* obj.input(“s”); // return []. There is no sentence with prefix “is”
* obj.input(“#”); // return [].



As the answer can be large, return your answer modulo 10^9 + 7.
Can you solve this using not more than O(S) extra space?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?