Which data structure to use in Java for the following scenario?
<p>I have a set of Elements which are prefixes. I've to write a Java method in such a way that whenever it gets an input verify in which prefix it belongs to and return true or false if it matches with any prefixes. 
Elements are </p>

<pre><code>1900
1901
1902
1903
17082
</code></pre>

<p>Input will be</p>

<pre><code>1900123445
1901334455
1800777777
...
</code></pre>

<p>Which Data Structure I can use so that it'll not hit the performance. Because the input numbers will be up to 50million at once.</p>

<p>Can anyone help me in this? Thanks in advance.</p>
