Given
From left - 4 out of 10 are wearing hats - this can be in any sequence - as long as any 4 are wearing hats when taken 10 from left
(1) 5 of the 6 people from the right are wearing hats. Lets take a case of N=11
Here there are 11 people, we can see that this fulfil all constraints
>> 4/10 from left are wearing hats, remaining 1 person to the right of the 10th - which is the 11th - is also wearing hat
>> 5/6 from right are wearing hats
But the case of N= 12 is also possible :
Here we have 12 people but this also fulfils all constraints
>> 4/10 from left wearing hats, remaining 2 people to the right of 10th person - 11th and 12th - are also wearing hats
>> 5/6 from right are wearing hats
So we have 2 possible cases and we do not have a fixed number of people that would fulfil these constraints. Therefore statement 1 is not sufficient.
(2) 3 of the 8 people from the left are wearing hats. This tells us that 1 person from 9 or 10th position is wearing hat, but does not give us more information on total number of people. There could be 5 people to the right of the 10th person, or 10 people - we dont know.
Statement 2 is insufficient
(1) and (2) together Let us again take the 2 cases we took earlier
N = 11, with some rearranging:
>> 4/10 from left are wearing hats, remaining 11th position is also wearing hat.
>> 3/8 from left are wearing hats
>> 5/6 from right are also wearing hats
N = 12, after some rearranging :
>> 4/10 from left are wearing hats, remaining 11th & 12th position is also wearing hat.
>> 3/8 from left are wearing hats
>> 5/6 from right are also wearing hats
So again we have 2 cases N =12 and N=11 possible. Statement 1 and 2 together are also not sufficient
Answer is E