<p>Design a data structure to find the <strong>frequency</strong> of a given value in a given subarray.</p>
<p>The <strong>frequency</strong> of a value in a subarray is the number of occurrences of that value in the subarray.</p>
<p>Implement the <code>RangeFreqQuery</code> class:</p>
<ul>
<li><code>RangeFreqQuery(int[] arr)</code> Constructs an instance of the class with the given <strong>0-indexed</strong> integer array <code>arr</code>.</li>
<li><code>int query(int left, int right, int value)</code> Returns the <strong>frequency</strong> of <code>value</code> in the subarray <code>arr[left...right]</code>.</li>
</ul>
<p>A <strong>subarray</strong> is a contiguous sequence of elements within an array. <code>arr[left...right]</code> denotes the subarray that contains the elements of <code>nums</code> between indices <code>left</code> and <code>right</code> (<strong>inclusive</strong>).</p>