Skip to content

Latest commit

 

History

History

challenge-10

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Find year with max population alive

Description

Given an array of people with their years of birth and death, find the first year with the biggest population alive.

Each people is described by an array of two elements, where the first element is the year of birth and the second element is the year of death

Examples

Input:
  [
    [1950, 2010],
    [1960, 1990],
    [1955, 2011]
  ]

Output: 1960