Given the life time of different elephants, find the period when maximum number of elephants lived
<p>I came across an interview question:</p>

<p>"Given life times of different elephants. Find the period when maximum number of elephants were alive." For example: <br>
Input: <code>[5, 10]</code>, <code>[6, 15]</code>, <code>[2, 7]</code> <br> 
Output: <code>[6,7]</code> (3 elephants)</p>

<p>I wonder if this problem can be related to the Longest substring problem for 'n' number of strings, such that each string represents the continuous range of a time period. </p>

<p>For e.g:
<code>[5,10] &lt;=&gt; 5 6 7 8 9 10</code></p>

<p>If not, what can be a good solution to this problem ? I want to code it in C++.</p>

<p>Any help will be appreciated.</p>
