You are viewing a single comment's thread. Return to all comments →
I have solved this using my code, which is using a Tree to find an ultra fast and efficient solution, based on pattern matching of an tree based algorithm, something that is industry proven and a standard to be fast and efficient to solving pattern matching problems.
I have seen all the codes in comments, manipulating main methods to get your answer. By avoiding the reading time of inputs into string arrays, saves you time, but that time saved isn't actually meant to be saved, that isn't the way these challenges are supposed to be answered. You are asked to implement it in a method after receiving the input arrays in the method code. YOU MUST IMPLEMENT IT IN THE METHOD. Otherwise your answers are just useless.