give array integer citation citationsi number citation researcher receive ith paper return compute researcher hindexaccorde definition hindex Wikipedia a scientist index h h n paper h citation n h paper h citation eachIf possible value h maximum take hindex Example 1input citation 30615output 3explanation 30615 mean researcher 5 paper total receive 3 0 6 1 5 citation respectivelysince researcher 3 paper 3 citation remain 3 citation hindex 3example 2input citation 131output 1 Constraintsn citationslength1 n 50000 citationsi 1000